openssh/openssh-6.4p1-servconf-parser.patch

32 lines
1.0 KiB
Diff

diff --git a/servconf.c b/servconf.c
index 1e88905..f20504b 100644
--- a/servconf.c
+++ b/servconf.c
@@ -1562,7 +1562,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);
@@ -1607,7 +1607,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);
@@ -1642,6 +1642,8 @@ process_server_config_line(ServerOptions *options, char *line,
break;
case sAuthenticationMethods:
+ if (cp == NULL || *cp == '\0')
+ fatal("%.200s line %d: Missing argument.", filename, linenum);
if (*activep && options->num_auth_methods == 0) {
while ((arg = strdelim(&cp)) && *arg != '\0') {
if (options->num_auth_methods >=