BUG/MINOR: server: Missing calloc return value check in srv_parse_source
authorRemi Tricot-Le Breton <rlebreton@haproxy.com>
Wed, 12 May 2021 07:44:06 +0000 (09:44 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 31 May 2021 08:50:32 +0000 (10:50 +0200)
commitf1800e64ef2428747e696b0ef2f78ab05a116dcc
tree081daa5ffc95577b1e7aef4c7334579380218bae
parente1ecfdda819c1241fd6330e95b8be5b3105f14e8
BUG/MINOR: server: Missing calloc return value check in srv_parse_source

Two calloc calls were not checked in the srv_parse_source function.
Considering that this function could be called at runtime through a
dynamic server creation via the CLI, this could lead to an unfortunate
crash.

It was raised in GitHub issue #1233.
It could be backported to all stable branches even though the runtime
crash could only happen on branches where dynamic server creation is
possible.
include/haproxy/port_range.h
src/server.c