]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: log: Add OOM checks for calloc() and malloc() in logformat parser and...
authorAlexander Stephan <alexander.stephan@sap.com>
Mon, 1 Sep 2025 09:36:07 +0000 (09:36 +0000)
committerWilly Tarreau <w@1wt.eu>
Tue, 2 Sep 2025 05:29:54 +0000 (07:29 +0200)
commit22ac1f5ee9889eb7273201de0d92449d9fc5e3fa
tree9561f9df9234fe09ac52c27f04448d664a118620
parentfbd0fb20a22a77f85ca2ec0e41cc5df51de3d30a
BUG/MINOR: log: Add OOM checks for calloc() and malloc() in logformat parser and dup_logger()

This patch adds missing out-of-memory (OOM) checks after calls
to `calloc()` and `malloc()` in the logformat parser and the
`dup_logger()` function. If memory allocation fails, an error
is reported or NULL is returned, preventing undefined behavior
in low-memory conditions.

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