Skip to content

Commit

Permalink
Potential fix for hpc#127 => Segmentation fault due to memory protect…
Browse files Browse the repository at this point in the history
…ion.
  • Loading branch information
JulianKunkel authored and glennklockwood committed Feb 7, 2019
1 parent 4b44399 commit 164f21a
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 @@ -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;
Expand Down

0 comments on commit 164f21a

Please sign in to comment.