summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoritojun <itojun@openbsd.org>2003-05-17 03:25:58 +0000
committeritojun <itojun@openbsd.org>2003-05-17 03:25:58 +0000
commitf69a8bc9c21d38600adb8093c8a98f5d293f7ae1 (patch)
tree13aa7b1cb08fd0dc27b4e47e56525cf9e2fb378f
parentpull in a bugfix from systrace-current to let systrace deal with creating (diff)
downloadwireguard-openbsd-f69a8bc9c21d38600adb8093c8a98f5d293f7ae1.tar.xz
wireguard-openbsd-f69a8bc9c21d38600adb8093c8a98f5d293f7ae1.zip
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;