upstream commit
Check for and reject missing arguments for VersionAddendum and ForceCommand. bz#2281, patch from plautrba at redhat com, ok djm@
This commit is contained in:
parent
ca42c17585
commit
bd902b8473
|
@ -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
|
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
||||||
* All rights reserved
|
* All rights reserved
|
||||||
|
@ -1612,7 +1612,7 @@ process_server_config_line(ServerOptions *options, char *line,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case sForceCommand:
|
case sForceCommand:
|
||||||
if (cp == NULL)
|
if (cp == NULL || *cp == '\0')
|
||||||
fatal("%.200s line %d: Missing argument.", filename,
|
fatal("%.200s line %d: Missing argument.", filename,
|
||||||
linenum);
|
linenum);
|
||||||
len = strspn(cp, WHITESPACE);
|
len = strspn(cp, WHITESPACE);
|
||||||
|
@ -1657,7 +1657,7 @@ process_server_config_line(ServerOptions *options, char *line,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case sVersionAddendum:
|
case sVersionAddendum:
|
||||||
if (cp == NULL)
|
if (cp == NULL || *cp == '\0')
|
||||||
fatal("%.200s line %d: Missing argument.", filename,
|
fatal("%.200s line %d: Missing argument.", filename,
|
||||||
linenum);
|
linenum);
|
||||||
len = strspn(cp, WHITESPACE);
|
len = strspn(cp, WHITESPACE);
|
||||||
|
|
Loading…
Reference in New Issue