]> git.itanic.dy.fi Git - rrdd/commit
Replace strncat with _strlcat
authorTimo Kokkonen <timo.t.kokkonen@iki.fi>
Sun, 11 Oct 2020 11:08:09 +0000 (14:08 +0300)
committerTimo Kokkonen <timo.t.kokkonen@iki.fi>
Sun, 11 Oct 2020 11:18:44 +0000 (14:18 +0300)
commit79f70e219dd77051935892bd45e223d5ebb0d632
tree34c0decf8e0ffb1cebdc682a9700e5ff5af6970f
parent6aa4a171029a0d2a2299d1216bfbbb3446d32420
Replace strncat with _strlcat

Using strncat is hard. The function expects you to know how many bytes
you can write in the buffer instead if figuring out itself.

Introduce a _strlcat call which correctly handles the buffer length
handling and guarantees the data is null terminated after the operation.

Even though the code here was handling the buffer length correctly,
the code is much simpler if _strlcat is used instead.

Signed-off-by: Timo Kokkonen <timo.t.kokkonen@iki.fi>
plugin_manager.c
rrdtool.c
utils.h