diff options
Diffstat (limited to 'readconf.c')
-rw-r--r-- | readconf.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/readconf.c b/readconf.c index 18f7dae8a..899ff3f0e 100644 --- a/readconf.c +++ b/readconf.c | |||
@@ -286,6 +286,13 @@ process_config_line(Options *options, const char *host, | |||
286 | u_short fwd_port, fwd_host_port; | 286 | u_short fwd_port, fwd_host_port; |
287 | char sfwd_host_port[6]; | 287 | char sfwd_host_port[6]; |
288 | 288 | ||
289 | /* Strip trailing whitespace */ | ||
290 | for(len = strlen(line) - 1; len > 0; len--) { | ||
291 | if (strchr(WHITESPACE, line[len]) == NULL) | ||
292 | break; | ||
293 | line[len] = '\0'; | ||
294 | } | ||
295 | |||
289 | s = line; | 296 | s = line; |
290 | /* Get the keyword. (Each line is supposed to begin with a keyword). */ | 297 | /* Get the keyword. (Each line is supposed to begin with a keyword). */ |
291 | keyword = strdelim(&s); | 298 | keyword = strdelim(&s); |