aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2024-09-20 08:42:09 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2024-09-20 13:11:44 -0400
commit8608e897410ca4a5ff94dd9868834a00214526f5 (patch)
tree1f7494604de598b60d188a270445026afa6f85ad
parent926d1f30206fb16801bfcf76661155cd18ccaab7 (diff)
downloadstasis-8608e897410ca4a5ff94dd9868834a00214526f5.tar.gz
value can never be NULL here, and is initialized to zero. Use strcpy().
-rw-r--r--src/strlist.c2
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);
}
}