BUG/MINOR: proxy: Missing calloc return value check in proxy_parse_declare
authorRemi Tricot-Le Breton <rlebreton@haproxy.com>
Wed, 12 May 2021 16:04:46 +0000 (18:04 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 31 May 2021 13:27:04 +0000 (15:27 +0200)
commit978b2d4a3dbc0a71786c78978c5eeb4c0c8e1b19
treeb1a0e5a7181522b4f70f4af457175f0403012f6a
parent199087a69300956b722abc59372cb19cb1bacdcb
BUG/MINOR: proxy: Missing calloc return value check in proxy_parse_declare

A memory allocation failure happening during proxy_parse_declare while
processing the "capture" 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 55ba0d6865662036d1d137dc4aac3841d29ad6d3)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 581d892c823ec18ff7066af696c2017c664959da)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/proxy.c