]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: halog: Add OOM checks for calloc() in filter_count_srv_status() and filter...
authorAlexander Stephan <alexander.stephan@sap.com>
Mon, 1 Sep 2025 09:32:04 +0000 (09:32 +0000)
committerWilly Tarreau <w@1wt.eu>
Tue, 2 Sep 2025 05:29:54 +0000 (07:29 +0200)
commitfbd0fb20a22a77f85ca2ec0e41cc5df51de3d30a
tree6632ad5f04a2a2c1ea0522b04d17d3cb98204b7c
parent8c555a4a4ee96d11d07bc800bf09a6bb970ea7e1
BUG/MINOR: halog: Add OOM checks for calloc() in filter_count_srv_status() and filter_count_url()

This patch adds missing out-of-memory (OOM) checks after calls to
calloc() in the functions `filter_count_srv_status()` and `filter_count_url()`.
If memory allocation fails, an error message is printed to stderr
and the process exits with status 1. This improves robustness
and prevents undefined behavior in low-memory situations.

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