]> git.kaiwu.me - haproxy.git/commit
BUILD: compression: make gcc 10 happy with free_zlib()
authorWilly Tarreau <w@1wt.eu>
Sun, 14 Jun 2020 05:50:18 +0000 (07:50 +0200)
committerWilly Tarreau <w@1wt.eu>
Sun, 14 Jun 2020 06:00:19 +0000 (08:00 +0200)
commitd999a496639465e809b1c053d3c1ae18e72345d4
treebc0582cb0f5e5d474952a27ff847ac3ce8562b14
parentff78fcdd7f15c8626c7e70add7a935221ee2920c
BUILD: compression: make gcc 10 happy with free_zlib()

In issue #685 gcc 10 seems to find a null pointer deref in free_zlib().
There is no such case because all possible pools are tested and there's
no other one in zlib, except if there's a bug or memory corruption
somewhere else. The code used to be written like this to make sure that
any such bug couldn't remain unnoticed.

Now gcc 10 sees this theorical code path and complains, so let's just
change the code to place an explicit crash in case of no match (which
must never happen).

This might be backported if other versions are affected.
src/compression.c