]> git.itanic.dy.fi Git - rrdd/commit
rrdtool: Fix strncat() usage
authorTimo Kokkonen <timo.t.kokkonen@iki.fi>
Wed, 30 Sep 2020 17:05:52 +0000 (20:05 +0300)
committerTimo Kokkonen <timo.t.kokkonen@iki.fi>
Wed, 30 Sep 2020 17:05:52 +0000 (20:05 +0300)
commita892c8cd224ec7d36ea02cd3a2dbdf682f9be8e0
tree285f3546862f52b09f4e734905d847809b0adf30
parent2f440ba4a1e5f559d66a51b51aaf6a98469a3c01
rrdtool: Fix strncat() usage

As per strncat man page:

       If src contains n or more bytes, strncat() writes n+1 bytes to
       dest (n from src plus the terminating null byte).  Therefore,
       the size of dest must be at least strlen(dest)+n+1.

Therefore, we must ensure the destination buffere does not overflow is
src is large enough.

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