]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: tools: make fgets_from_mem() stop at the end of the input
authorWilly Tarreau <w@1wt.eu>
Sun, 11 Aug 2024 12:44:28 +0000 (14:44 +0200)
committerWilly Tarreau <w@1wt.eu>
Sun, 11 Aug 2024 12:44:28 +0000 (14:44 +0200)
commit0982bfd9997d73bae1257da56413898f5f8d97fe
tree6cd4d3759f513964341e4d089e1807413750ffc8
parent75944e266e08687f308dcad42a695ac8d1e03bc4
BUG/MINOR: tools: make fgets_from_mem() stop at the end of the input

The memchr() used to look for the LF character must consider the end of
input, not just the output buffer size.

This was found by oss-fuzz:
   https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=71096

No backport is needed.
src/tools.c