summaryrefslogtreecommitdiff
path: root/servconf.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2017-02-03 05:05:56 +0000
committerDamien Miller <djm@mindrot.org>2017-02-03 16:07:27 +1100
commitc924b2ef941028a1f31e6e94f54dfeeeef462a4e (patch)
treee7d4f32f985b799b2a591460e80b69020f5108fb /servconf.c
parent523db8540b720c4d21ab0ff6f928476c70c38aab (diff)
upstream commit
allow form-feed characters at EOL; bz#2431 ok dtucker@ Upstream-ID: 1f453afaba6da2ae69d6afdf1ae79a917552f1a2
Diffstat (limited to 'servconf.c')
-rw-r--r--servconf.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/servconf.c b/servconf.c
index c9105a592..1880b8cfd 100644
--- a/servconf.c
+++ b/servconf.c
@@ -1,5 +1,5 @@
1 1
2/* $OpenBSD: servconf.c,v 1.302 2017/01/06 03:45:41 djm Exp $ */ 2/* $OpenBSD: servconf.c,v 1.303 2017/02/03 05:05:56 djm 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
@@ -966,6 +966,15 @@ process_server_config_line(ServerOptions *options, char *line,
966 long long val64; 966 long long val64;
967 const struct multistate *multistate_ptr; 967 const struct multistate *multistate_ptr;
968 968
969 /* Strip trailing whitespace. Allow \f (form feed) at EOL only */
970 if ((len = strlen(line)) == 0)
971 return 0;
972 for (len--; len > 0; len--) {
973 if (strchr(WHITESPACE "\f", line[len]) == NULL)
974 break;
975 line[len] = '\0';
976 }
977
969 cp = line; 978 cp = line;
970 if ((arg = strdelim(&cp)) == NULL) 979 if ((arg = strdelim(&cp)) == NULL)
971 return 0; 980 return 0;