X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Futils_ignorelist.c;h=518715b1f48ada50c018e38f600dd6c14bcbd66f;hb=92445ff3363441d0f515de4a3ab92a504cfc0366;hp=1d9467fe210d89e6ce0f9c6537e3be9e389d6e8e;hpb=7746d34c8ecc4fa984187cf2b1a93d1b6d3a061b;p=collectd.git diff --git a/src/utils_ignorelist.c b/src/utils_ignorelist.c index 1d9467fe..518715b1 100644 --- a/src/utils_ignorelist.c +++ b/src/utils_ignorelist.c @@ -310,7 +310,7 @@ int ignorelist_add (ignorelist_t *il, const char *entry) /* We need to copy `entry' since it's const */ entry_copy = smalloc (entry_len); memset (entry_copy, '\0', entry_len); - strncpy (entry_copy, entry + 1, entry_len - 2); + sstrncpy (entry_copy, entry + 1, entry_len - 2); DEBUG("I'm about to add regex entry: %s", entry_copy); ret = ignorelist_append_regex(il, entry_copy);