BUG/MINOR: http: Missing calloc return value check while parsing tcp-request rule
authorRemi Tricot-Le Breton <rlebreton@haproxy.com>
Mon, 17 May 2021 08:08:16 +0000 (10:08 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 31 May 2021 13:31:26 +0000 (15:31 +0200)
commitd9bb052e9f50c3257f3710d0e6715e17c565f08c
treea14535887c9da587911e33e1d76cd6156d7809b4
parenteb2679217238bf5271eaf14fd9aac281caa80229
BUG/MINOR: http: Missing calloc return value check while parsing tcp-request rule

A memory allocation failure happening in tcp_parse_request_rule while
processing the "capture" keyword and trying to allocate a cap_hdr
structure would have resulted in a crash. This function is only called
during configuration parsing.

It was raised in GitHub issue #1233.
It could be backported to all stable branches.

(cherry picked from commit 8cb033643ff3235ac0d3887167ce06fefeaf850b)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 31d170c581e8e4f726d7a54288b969cd38dde4b5)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/tcp_rules.c