BUG/MINOR: http: Missing calloc return value check while parsing redirect rule
authorRemi Tricot-Le Breton <rlebreton@haproxy.com>
Wed, 19 May 2021 09:32:04 +0000 (11:32 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 31 May 2021 13:31:39 +0000 (15:31 +0200)
commit9b636961a1196478f2b86275ae1775c689ac5aba
treeba06797efa6e36af8d5c3363a7580be518f38447
parent80dc1454cb19abf3ba8458e7d35cc0d05211bee0
BUG/MINOR: http: Missing calloc return value check while parsing redirect rule

A memory allocation failure happening in http_parse_redirect_rule when
trying to allocate a redirect_rule 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 b6864a5b6fa1ea6eb224710d00c897105b9e2a46)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit e10a8f6b9c9437efe8b78239c92ed18775353d1c)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/http_rules.c