]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUILD/MINOR: htx: fix some potential null-deref warnings with http_find_stline
authorWilly Tarreau <w@1wt.eu>
Tue, 12 Feb 2019 11:02:27 +0000 (12:02 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 12 Feb 2019 11:02:27 +0000 (12:02 +0100)
commitcdce54c2b7490e57e8f5d4a40875724d4e790eec
tree8509ab800def32133cfdbd972fb2d80bbbad1b30
parent9bdd7bc63d94501e649bc0f5c0c3d4a4288004cc
BUILD/MINOR: htx: fix some potential null-deref warnings with http_find_stline

http_find_stline() carefully verifies that it finds a start line otherwise
returns NULL when not found. But a few calling functions ignore this NULL
in return and dereference this pointer without checking. Let's add the
test where needed in the callers. If it turns out that over the long term
a start line is mandatory, then the test will be removed and the faulty
function will have to be simplified.

This must be backported to 1.9.
src/http_htx.c