diff options
Diffstat (limited to 'libc/misc/internals')
-rw-r--r-- | libc/misc/internals/parse_config.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libc/misc/internals/parse_config.c b/libc/misc/internals/parse_config.c index 6d3b6f4a0..c17d25553 100644 --- a/libc/misc/internals/parse_config.c +++ b/libc/misc/internals/parse_config.c @@ -79,6 +79,13 @@ static off_t bb_get_chunk_with_continuation(parser_t* parsr) parsr->data = realloc(parsr->data, parsr->data_len + parsr->line_len); parsr->line = parsr->data + parsr->data_len; + } else { + /* discard rest of line if not enough space in buffer */ + int c; + do { + c = fgetc(parsr->fp); + } while (c != EOF && c != '\n'); + break; } } return pos; |