diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2024-09-20 08:42:09 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2024-09-20 13:11:44 -0400 |
commit | 8608e897410ca4a5ff94dd9868834a00214526f5 (patch) | |
tree | 1f7494604de598b60d188a270445026afa6f85ad | |
parent | 926d1f30206fb16801bfcf76661155cd18ccaab7 (diff) | |
download | stasis-8608e897410ca4a5ff94dd9868834a00214526f5.tar.gz |
value can never be NULL here, and is initialized to zero. Use strcpy().
-rw-r--r-- | src/strlist.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); } } |