1
0
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:
Tamas TEVESZ
2010-09-23 14:30:19 +02:00
committed by Carlos R. Mafra
parent a71a604ab1
commit 553464d965

View File

@@ -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);