Skip to content

Commit

Permalink
fixed the create_dir_hierarchy() to not use uninited memory, as notic…
Browse files Browse the repository at this point in the history
…ed by

Matthew Blain.
  • Loading branch information
bagder committed Jan 7, 2003
1 parent e69362d commit 0f34521
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 0f34521

Please sign in to comment.