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

master
Julian M. Kunkel 2019-01-19 17:00:49 +00:00 committed by Glenn K. Lockwood
parent 4b443994cb
commit b561f60702
1 changed files with 2 additions and 0 deletions

View File

@ -211,6 +211,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;