diff options
Diffstat (limited to 'readconf.c')
-rw-r--r-- | readconf.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/readconf.c b/readconf.c index c62c2eaba..9d59493f0 100644 --- a/readconf.c +++ b/readconf.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: readconf.c,v 1.269 2017/03/10 03:24:48 dtucker Exp $ */ | 1 | /* $OpenBSD: readconf.c,v 1.270 2017/03/10 04:27:32 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -1720,7 +1720,7 @@ read_config_file_depth(const char *filename, struct passwd *pw, | |||
1720 | int flags, int *activep, int depth) | 1720 | int flags, int *activep, int depth) |
1721 | { | 1721 | { |
1722 | FILE *f; | 1722 | FILE *f; |
1723 | char line[1024]; | 1723 | char line[4096]; |
1724 | int linenum; | 1724 | int linenum; |
1725 | int bad_options = 0; | 1725 | int bad_options = 0; |
1726 | 1726 | ||
@@ -1750,6 +1750,8 @@ read_config_file_depth(const char *filename, struct passwd *pw, | |||
1750 | while (fgets(line, sizeof(line), f)) { | 1750 | while (fgets(line, sizeof(line), f)) { |
1751 | /* Update line number counter. */ | 1751 | /* Update line number counter. */ |
1752 | linenum++; | 1752 | linenum++; |
1753 | if (strlen(line) == sizeof(line) - 1) | ||
1754 | fatal("%s line %d too long", filename, linenum); | ||
1753 | if (process_config_line_depth(options, pw, host, original_host, | 1755 | if (process_config_line_depth(options, pw, host, original_host, |
1754 | line, filename, linenum, activep, flags, depth) != 0) | 1756 | line, filename, linenum, activep, flags, depth) != 0) |
1755 | bad_options++; | 1757 | bad_options++; |