]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: spoe: check buffer size before acquiring or releasing it
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 10 Nov 2017 10:54:58 +0000 (11:54 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 13 Nov 2017 10:38:12 +0000 (11:38 +0100)
commit600d37edda6a4aebeffe85da97cd7277b5f2c217
treead63d5dc6ee81380af7f0d9d6ed0f578407acc36
parent3e5e417060f04e2bf96ef98199014ad2c7b8e203
BUG/MINOR: spoe: check buffer size before acquiring or releasing it

In spoe_acquire_buffer and spoe_release_buffer, instead of checking the buffer
against buf_empty, we now check its size. It is important because when an
allocation fails, it will be set to buf_wanted. In both cases, the size is 0.

It is a proactive bug fix, no real problem was observed till now. It cannot be
backported as is in 1.7 because of all changes made on the SPOE in 1.8.
src/flt_spoe.c