1
0
mirror of https://gittea.dev/nova/th.git synced 2025-10-25 20:24:33 -04:00

removal of all strcpy

This commit is contained in:
nova
2025-10-17 22:23:45 +02:00
parent df726e2f32
commit 326d3f7e52
5 changed files with 12 additions and 12 deletions

2
dir.c
View File

@@ -66,7 +66,7 @@ void get_dir_content(char *path, unsigned long *dir_file_count, file *dir_conten
if (entry[i]->d_name[0] == '.' && !(file_modifiers & FILE_MODIFIERS_HIDDEN_FILES)) {
} else {
dir_content[i].file_name = malloc(strlen(entry[i]->d_name)+1);
strcpy(dir_content[i].file_name, entry[i]->d_name);
memcpy(dir_content[i].file_name, entry[i]->d_name, strlen(entry[i]->d_name) + 1);
struct stat *file;