]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commit
Fix string truncation warnings related to PATH_MAX (#1244)
authorMichal Suchánek <msuchanek@suse.de>
Mon, 8 Jan 2024 12:59:56 +0000 (13:59 +0100)
committerGitHub <noreply@github.com>
Mon, 8 Jan 2024 12:59:56 +0000 (13:59 +0100)
commite66ec714d322a627c73fd9e05765b9af4297c6c8
tree623800155865b6991f3d4ab2b57cd0a8a77dabc0
parent6892508386bf9b5651fdb86b3931349073922d40
Fix string truncation warnings related to PATH_MAX (#1244)

There are a number of places where rrdtool combines multiple PATH_MAX
sized strings into one.

PATH_MAX is a constant that tends to work in practice a lot of the time
but may not reflect the real capabilities of the system in real time.

In place of on-stack buffers of PATH_MAX size allocate memory
dynamically. Initialize the pointers to NULL so they can be all freed
unconditionally on exit.

Fixes: #1223
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
CHANGES
src/rrd_daemon.c
src/rrd_list.c