mirror of
https://github.com/moparisthebest/curl
synced 2024-11-11 12:05:06 -05:00
fixed the create_dir_hierarchy() to not use uninited memory, as noticed by
Matthew Blain.
This commit is contained in:
parent
e69362df22
commit
0f34521612
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user