]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: cfgparse: don't increment linenum on incomplete lines
authorWilly Tarreau <w@1wt.eu>
Thu, 25 Jun 2020 07:37:54 +0000 (09:37 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 25 Jun 2020 07:43:27 +0000 (09:43 +0200)
commit40cb26f6ec8cf9d8ba54706d95df4cfed3a7b332
tree1e3c212f3cdf4f38de5e6d62500d5022a7667fca
parenta941952ae1dbae0b7d015ad29dcf877d1f74df0b
BUG/MINOR: cfgparse: don't increment linenum on incomplete lines

When fgets() returns an incomplete line we must not increment linenum
otherwise line numbers become incorrect. This may happen when parsing
files with extremely long lines which require a realloc().

The bug has been present since unbounded line length was supported, so
the fix should be backported to older branches.
src/cfgparse.c