summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/servconf.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@cvs.openbsd.org>2015-04-23 04:53:54 +0000
committerDarren Tucker <dtucker@cvs.openbsd.org>2015-04-23 04:53:54 +0000
commit97f3eade75fadd358a3a8068a9652e0191634deb (patch)
tree035d50913ff868e0e825414041d61a732642c32c /usr.bin/ssh/servconf.c
parent0535907297d082da71248622904440770525b57f (diff)
Check for and reject missing arguments for VersionAddendum and ForceCommand.
bz#2281, patch from plautrba at redhat com, ok djm@
Diffstat (limited to 'usr.bin/ssh/servconf.c')
-rw-r--r--usr.bin/ssh/servconf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/ssh/servconf.c b/usr.bin/ssh/servconf.c
index 240b858e130..8de276a0c3b 100644
--- a/usr.bin/ssh/servconf.c
+++ b/usr.bin/ssh/servconf.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: servconf.c,v 1.261 2015/04/17 04:12:35 dtucker Exp $ */
+/* $OpenBSD: servconf.c,v 1.262 2015/04/23 04:53:53 dtucker Exp $ */
/*
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
* All rights reserved
@@ -1564,7 +1564,7 @@ process_server_config_line(ServerOptions *options, char *line,
break;
case sForceCommand:
- if (cp == NULL)
+ if (cp == NULL || *cp == '\0')
fatal("%.200s line %d: Missing argument.", filename,
linenum);
len = strspn(cp, WHITESPACE);
@@ -1609,7 +1609,7 @@ process_server_config_line(ServerOptions *options, char *line,
break;
case sVersionAddendum:
- if (cp == NULL)
+ if (cp == NULL || *cp == '\0')
fatal("%.200s line %d: Missing argument.", filename,
linenum);
len = strspn(cp, WHITESPACE);