]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: cfgparse: Add OOM check for calloc() in cfg_parse_listen()
authorAlexander Stephan <alexander.stephan@sap.com>
Mon, 1 Sep 2025 09:51:19 +0000 (09:51 +0000)
committerWilly Tarreau <w@1wt.eu>
Tue, 2 Sep 2025 05:29:54 +0000 (07:29 +0200)
commit73f9a75894c660dd034439e0bc343aa00489dbc9
treea2b59e277619d6f68fd29f664408b8ea3974d888
parentc3e69cf065c59acbe01db5452f29b7ac199354d5
BUG/MINOR: cfgparse: Add OOM check for calloc() in cfg_parse_listen()

This commit adds a missing out-of-memory (OOM) check
after the call to `calloc()` in `cfg_parse_listen()`.
If memory allocation fails, an alert is logged, error
codes are set, and parsing is aborted to prevent
undefined behavior.

Co-authored-by: Christian Norbert Menges <christian.norbert.menges@sap.com>
src/cfgparse-listen.c