Skip to content

Commit

Permalink
Potential fix for #127 => Segmentation fault due to memory protection.
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianKunkel committed Jan 19, 2019
1 parent e71cded commit 20bb99e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/mdtest.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 20bb99e

Please sign in to comment.