From 164f21a9865566c1a86384918d90cfff020bf366 Mon Sep 17 00:00:00 2001 From: "Julian M. Kunkel" Date: Sat, 19 Jan 2019 17:00:49 +0000 Subject: [PATCH] Potential fix for #127 => Segmentation fault due to memory protection. --- src/mdtest.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mdtest.c b/src/mdtest.c index 37032f13..cf580501 100644 --- a/src/mdtest.c +++ b/src/mdtest.c @@ -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;