diff --git a/src/utils_ignorelist.c b/src/utils_ignorelist.c
index 689b4a42fd7c506f7dd4a4321071a62e9a9705c0..de42d0fa399035e0f2e3930866d2be670557fc72 100644 (file)
--- a/src/utils_ignorelist.c
+++ b/src/utils_ignorelist.c
/* We need to copy `entry' since it's const */
entry_copy_size = entry_len - 1;
entry_copy = smalloc (entry_copy_size);
- strncpy (entry_copy, entry + 1, entry_copy_size);
- entry_copy[entry_copy_size - 1] = 0;
+ sstrncpy (entry_copy, entry + 1, entry_copy_size);
DEBUG("I'm about to add regex entry: %s", entry_copy);
ret = ignorelist_append_regex(il, entry_copy);