Potential fix for #127 => Segmentation fault due to memory protection.
parent
e71cded6c3
commit
20bb99e1b7
|
@ -215,6 +215,8 @@ void parse_dirpath(char *dirpath_arg) {
|
||||||
FAIL("out of memory");
|
FAIL("out of memory");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// prevent changes to the original dirpath_arg
|
||||||
|
dirpath_arg = strdup(dirpath_arg);
|
||||||
token = strtok(dirpath_arg, delimiter_string);
|
token = strtok(dirpath_arg, delimiter_string);
|
||||||
while (token != NULL) {
|
while (token != NULL) {
|
||||||
filenames[i] = token;
|
filenames[i] = token;
|
||||||
|
|
Loading…
Reference in New Issue