summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordjm <djm@openbsd.org>2010-07-02 04:32:44 +0000
committerdjm <djm@openbsd.org>2010-07-02 04:32:44 +0000
commite7ff128fde1eb49d34e63197fcf577946a0ecdfe (patch)
treebd2621eaeafa0b8874fb5c9fcb762c5a4037a7a6
parenttimeout_add -> timeout_add_msec (diff)
downloadwireguard-openbsd-e7ff128fde1eb49d34e63197fcf577946a0ecdfe.tar.xz
wireguard-openbsd-e7ff128fde1eb49d34e63197fcf577946a0ecdfe.zip
unbreak strdelim() skipping past quoted strings, e.g.
AllowUsers "blah blah" blah was broken; report and fix in bz#1757 from bitman.zhou AT centrify.com ok dtucker;
-rw-r--r--usr.bin/ssh/misc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/ssh/misc.c b/usr.bin/ssh/misc.c
index 11ee7f16674..46a66126a1e 100644
--- a/usr.bin/ssh/misc.c
+++ b/usr.bin/ssh/misc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: misc.c,v 1.76 2010/05/21 05:00:36 djm Exp $ */
+/* $OpenBSD: misc.c,v 1.77 2010/07/02 04:32:44 djm Exp $ */
/*
* Copyright (c) 2000 Markus Friedl. All rights reserved.
* Copyright (c) 2005,2006 Damien Miller. All rights reserved.
@@ -171,6 +171,7 @@ strdelim(char **s)
return (NULL); /* no matching quote */
} else {
*s[0] = '\0';
+ *s += strspn(*s + 1, WHITESPACE) + 1;
return (old);
}
}