Remove strncpy

This commit is contained in:
2022-08-16 20:16:46 +02:00
parent 41e12d6293
commit 4fe067ed7d
3 changed files with 16 additions and 8 deletions
+2 -1
View File
@@ -135,7 +135,8 @@ int mime_is_compressible(const char *type) {
}
int strcpy_rem_webroot(char *dst, const char *src, long len, const char *webroot) {
strncpy(dst, src, len);
memcpy(dst, src, len);
dst[len] = 0;
if (webroot == NULL)
return 0;