From 0f34521612456d844959b1ef0ad5555d1821b67d Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 7 Jan 2003 09:35:57 +0000 Subject: fixed the create_dir_hierarchy() to not use uninited memory, as noticed by Matthew Blain. --- src/main.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/main.c') 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); -- cgit v1.2.3