1
0
Fork 0
forked from poz/modfetch

Compare commits

...

2 commits

Author SHA1 Message Date
3062c78d8e Merge pull request 'nullterm after strncpy' (#2) from jacekpoz/modfetch:master into master
Reviewed-on: #2
2024-02-09 16:19:11 +01:00
76fd2153a9
nullterm after strncpy
great function thanks glibc
2024-02-09 15:46:33 +01:00

View file

@ -159,6 +159,7 @@ Config parse_config(FILE *config_file) {
in_config = true;
// get rid of the '{'
strncpy(current_path, line, (size_t)read - 2);
current_path[read - 2] = '\0';
current_module.path = process_str(current_path);
current_module.config = malloc(INITIAL_CONFIG_SIZE * sizeof(char*));