summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordtucker@openbsd.org <dtucker@openbsd.org>2015-04-23 04:53:53 +0000
committerDamien Miller <djm@mindrot.org>2015-04-29 18:14:23 +1000
commitbd902b8473e1168f19378d5d0ae68d0c203525df (patch)
tree9bd52d1d5de54cd98d021293573702102b419bd4
parentca42c1758575e592239de1d5755140e054b91a0d (diff)
upstream commit
Check for and reject missing arguments for VersionAddendum and ForceCommand. bz#2281, patch from plautrba at redhat com, ok djm@
-rw-r--r--servconf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/servconf.c b/servconf.c
index bc1350f76..3014361ea 100644
--- a/servconf.c
+++ b/servconf.c
@@ -1,5 +1,5 @@
1 1
2/* $OpenBSD: servconf.c,v 1.261 2015/04/17 04:12:35 dtucker Exp $ */ 2/* $OpenBSD: servconf.c,v 1.262 2015/04/23 04:53:53 dtucker Exp $ */
3/* 3/*
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
5 * All rights reserved 5 * All rights reserved
@@ -1612,7 +1612,7 @@ process_server_config_line(ServerOptions *options, char *line,
1612 break; 1612 break;
1613 1613
1614 case sForceCommand: 1614 case sForceCommand:
1615 if (cp == NULL) 1615 if (cp == NULL || *cp == '\0')
1616 fatal("%.200s line %d: Missing argument.", filename, 1616 fatal("%.200s line %d: Missing argument.", filename,
1617 linenum); 1617 linenum);
1618 len = strspn(cp, WHITESPACE); 1618 len = strspn(cp, WHITESPACE);
@@ -1657,7 +1657,7 @@ process_server_config_line(ServerOptions *options, char *line,
1657 break; 1657 break;
1658 1658
1659 case sVersionAddendum: 1659 case sVersionAddendum:
1660 if (cp == NULL) 1660 if (cp == NULL || *cp == '\0')
1661 fatal("%.200s line %d: Missing argument.", filename, 1661 fatal("%.200s line %d: Missing argument.", filename,
1662 linenum); 1662 linenum);
1663 len = strspn(cp, WHITESPACE); 1663 len = strspn(cp, WHITESPACE);