Skip to content

Commit b561f60

Browse files
JulianKunkelglennklockwood
authored andcommitted
Potential fix for #127 => Segmentation fault due to memory protection.
1 parent 4b44399 commit b561f60

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/mdtest.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,8 @@ void parse_dirpath(char *dirpath_arg) {
211211
FAIL("out of memory");
212212
}
213213

214+
// prevent changes to the original dirpath_arg
215+
dirpath_arg = strdup(dirpath_arg);
214216
token = strtok(dirpath_arg, delimiter_string);
215217
while (token != NULL) {
216218
filenames[i] = token;

0 commit comments

Comments
 (0)