diff options
Diffstat (limited to 'servconf.c')
-rw-r--r-- | servconf.c | 11 |
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; |