]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: tools: Add OOM check for malloc() in indent_msg()
authorAlexander Stephan <alexander.stephan@sap.com>
Mon, 1 Sep 2025 10:01:50 +0000 (10:01 +0000)
committerWilly Tarreau <w@1wt.eu>
Tue, 2 Sep 2025 05:29:54 +0000 (07:29 +0200)
commit26776c7b8f963299585300472a2b29ad39e47943
treea60ef859b5e4f0848b434ee046f9fd11c5ae2c6a
parentaa20905ac9e45c6caa8929f4686020708209e2bf
BUG/MINOR: tools: Add OOM check for malloc() in indent_msg()

This patch adds a missing out-of-memory (OOM) check after
the call to `malloc()` in `indent_msg()`. If memory
allocation fails, the function returns NULL to prevent
undefined behavior.

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