]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: cfgparse-listen: fix ebpt_next_dup pointer dereference on proxy "from...
authorAurelien DARRAGON <adarragon@haproxy.com>
Mon, 21 Nov 2022 16:01:11 +0000 (17:01 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 22 Nov 2022 15:27:52 +0000 (16:27 +0100)
commit9dce88ba2cb73b6c3665b4eeaa74186ebce2c7a5
tree09736f5dcf7de4e0bf613f91a5db1ee997ba9b7e
parent7078fb1f3a11b1af3170e47cbc250387b3eb6ee5
BUG/MINOR: cfgparse-listen: fix ebpt_next_dup pointer dereference on proxy "from" inheritance

ebpt_next_dup() was used 2 times in a row but only the first call was
checked against NULL, probably assuming that the 2 calls always yield the
same result here.

gcc is not OK with that, and it should be safer to store the result of
the first call in a temporary var to dereference it once checked against NULL.

This should fix GH #1869.
Thanks to Ilya for reporting this issue.

It may be backported up to 2.4.
src/cfgparse-listen.c