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:
2
dir.c
2
dir.c
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user