path_mkdir - safety check
This commit is contained in:
parent
0919cd9746
commit
5794c2051c
1 changed files with 4 additions and 0 deletions
|
@ -205,6 +205,10 @@ bool path_mkdir(const char *dir)
|
|||
/* Use heap. Real chance of stack
|
||||
* overflow if we recurse too hard. */
|
||||
basedir = strdup(dir);
|
||||
|
||||
if (!basedir)
|
||||
return false;
|
||||
|
||||
path_parent_dir(basedir);
|
||||
|
||||
if (!*basedir || !strcmp(basedir, dir))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue