Skip to content
Snippets Groups Projects
Commit 0f345216 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

fixed the create_dir_hierarchy() to not use uninited memory, as noticed by

Matthew Blain.
parent e69362df
No related branches found
No related tags found
No related merge requests found
......@@ -3054,6 +3054,9 @@ static int create_dir_hierarchy(char *outfile)
outdup = strdup(outfile);
dirbuildup = malloc(sizeof(char) * strlen(outfile));
if(!dirbuildup)
return -1;
dirbuildup[0] = '\0';
tempdir = strtok(outdup, DIR_CHAR);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment