BUG/MINOR: http: Missing calloc return value check in parse_http_req_capture
authorRemi Tricot-Le Breton <rlebreton@haproxy.com>
Wed, 12 May 2021 15:54:17 +0000 (17:54 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 31 May 2021 13:27:01 +0000 (15:27 +0200)
commit199087a69300956b722abc59372cb19cb1bacdcb
tree5f14fc74a8b02f9af2340fba559a7c03da8772c1
parente10ab28ffdedb731f17ce1465def365c2cbeaa74
BUG/MINOR: http: Missing calloc return value check in parse_http_req_capture

A memory allocation failure happening in parse_http_req_capture while
processing a "len" keyword and allocating 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 a4bf8a059dd9c783c00680aedcf055faa4b5d784)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 737d8b5c7bbcc38152b5621715f6f34b94d6fc37)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/http_act.c