BUG/MINOR: compression: Missing calloc return value check in comp_append_type/algo
authorRemi Tricot-Le Breton <rlebreton@haproxy.com>
Mon, 17 May 2021 08:35:08 +0000 (10:35 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 31 May 2021 13:31:30 +0000 (15:31 +0200)
commit46bd5dca638832fea6ce529caebf07cb034b9e3b
tree2edfaa9d68b2a3525ecc3f4f81ecef67c61f42c4
parentd9bb052e9f50c3257f3710d0e6715e17c565f08c
BUG/MINOR: compression: Missing calloc return value check in comp_append_type/algo

A memory allocation failure happening in comp_append_type or
comp_append_algo called while parsing compression options 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 6443bcc2e1f2e1e11af76ef460d8241f06223de8)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit a3a8d50d992ab145e5c353cc36e8a787d3aead57)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/compression.c
src/flt_http_comp.c