From 8608e897410ca4a5ff94dd9868834a00214526f5 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Fri, 20 Sep 2024 08:42:09 -0400 Subject: value can never be NULL here, and is initialized to zero. Use strcpy(). --- src/strlist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/strlist.c') diff --git a/src/strlist.c b/src/strlist.c index de76744..7a045f1 100644 --- a/src/strlist.c +++ b/src/strlist.c @@ -331,7 +331,7 @@ void strlist_set(struct StrList **pStrList, size_t index, char *value) { } memset((*pStrList)->data[index], '\0', strlen(value) + 1); - strncpy((*pStrList)->data[index], value, strlen(value)); + strcpy((*pStrList)->data[index], value); } } -- cgit