BUG/MINOR: http: Missing calloc return value check while parsing tcp-request/tcp...
authorRemi Tricot-Le Breton <rlebreton@haproxy.com>
Wed, 12 May 2021 16:24:18 +0000 (18:24 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 31 May 2021 13:31:22 +0000 (15:31 +0200)
commiteb2679217238bf5271eaf14fd9aac281caa80229
tree14d22c181b4b9ebfce634e540f7f4d5374659e6c
parent1c3a202760d998833edc6768f457628ee6d8beea
BUG/MINOR: http: Missing calloc return value check while parsing tcp-request/tcp-response

A memory allocation failure happening in tcp_parse_tcp_req or
tcp_parse_tcp_rep when trying to allocate an act_rule structure would
have resulted in a crash. These functions are only called during
configuration parsing.

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

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