mirror of
https://github.com/gryf/wmaker.git
synced 2026-02-02 14:15:46 +01:00
WINGs: Return NULL on NULL input in checkFile()
Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
This commit is contained in:
committed by
Carlos R. Mafra
parent
a71a604ab1
commit
553464d965
@@ -66,6 +66,9 @@ static char *checkFile(char *path, char *folder, char *ext, char *resource)
|
||||
char *ret;
|
||||
int extralen;
|
||||
|
||||
if (!path || !resource)
|
||||
return NULL;
|
||||
|
||||
extralen = (ext ? strlen(ext) : 0) + (folder ? strlen(folder) : 0) + 4;
|
||||
ret = wmalloc(strlen(path) + strlen(resource) + extralen + 8);
|
||||
strcpy(ret, path);
|
||||
|
||||
Reference in New Issue
Block a user