Potential fix for #127 => Segmentation fault due to memory protection.

master
Julian M. Kunkel 2019-01-19 17:00:49 +00:00
parent e71cded6c3
commit 20bb99e1b7
1 changed files with 2 additions and 0 deletions

View File

@ -215,6 +215,8 @@ void parse_dirpath(char *dirpath_arg) {
FAIL("out of memory");
}
// prevent changes to the original dirpath_arg
dirpath_arg = strdup(dirpath_arg);
token = strtok(dirpath_arg, delimiter_string);
while (token != NULL) {
filenames[i] = token;