diff options
author | Daniel Stenberg <daniel@haxx.se> | 2003-01-07 09:35:57 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2003-01-07 09:35:57 +0000 |
commit | 0f34521612456d844959b1ef0ad5555d1821b67d (patch) | |
tree | 30e8be0c8d623a8dbdcae6b271063e57e948f44b /src | |
parent | e69362df2291f0f692af027f4a455415aeb7030f (diff) |
fixed the create_dir_hierarchy() to not use uninited memory, as noticed by
Matthew Blain.
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c index 992c3413c..813bf49cc 100644 --- a/src/main.c +++ b/src/main.c @@ -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); |