summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2003-05-17 03:25:59 +0000
committerJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2003-05-17 03:25:59 +0000
commitc4c2a5a0f95b4ffe9c3e398060f7ee44d9338d42 (patch)
tree2193f97a25500a2100d661d54188e9b0f38dd089
parent4ed43aa9c5649a159fa81dfa121248884f0e3f75 (diff)
just in case, put numbers to sscanf %s arg.
-rw-r--r--usr.bin/ssh/auth-rhosts.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/ssh/auth-rhosts.c b/usr.bin/ssh/auth-rhosts.c
index de2cb67f3e2..a3847810852 100644
--- a/usr.bin/ssh/auth-rhosts.c
+++ b/usr.bin/ssh/auth-rhosts.c
@@ -14,7 +14,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: auth-rhosts.c,v 1.29 2003/04/08 20:21:28 itojun Exp $");
+RCSID("$OpenBSD: auth-rhosts.c,v 1.30 2003/05/17 03:25:58 itojun Exp $");
#include "packet.h"
#include "uidswap.h"
@@ -68,7 +68,8 @@ check_rhosts_file(const char *filename, const char *hostname,
* This should be safe because each buffer is as big as the
* whole string, and thus cannot be overwritten.
*/
- switch (sscanf(buf, "%s %s %s", hostbuf, userbuf, dummy)) {
+ switch (sscanf(buf, "%1023s %1023s %1023s", hostbuf, userbuf,
+ dummy)) {
case 0:
auth_debug_add("Found empty line in %.100s.", filename);
continue;