refactor: strncpy -> strlcpy

This commit is contained in:
2025-11-10 14:13:27 +01:00
parent f5bf71f535
commit 352f97c2db
7 changed files with 22 additions and 17 deletions
+2 -1
View File
@@ -1,3 +1,4 @@
#include <bsd/string.h>
#include <log.h>
#include <stdbool.h>
#include <stdio.h>
@@ -68,7 +69,7 @@ bool file_update(File *file) {
}
void file_read(File *file, char *path) {
strncpy(file->path, path, STR_LEN);
strlcpy(file->path, path, STR_LEN);
file->content = NULL;
file->error = false;
file->last_write = 0;