From 553464d9654458f4ed8b72895e14d7512c55749a Mon Sep 17 00:00:00 2001 From: Tamas TEVESZ Date: Thu, 23 Sep 2010 14:30:19 +0200 Subject: [PATCH] WINGs: Return NULL on NULL input in checkFile() Signed-off-by: Tamas TEVESZ --- WINGs/wapplication.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/WINGs/wapplication.c b/WINGs/wapplication.c index 620e378b..df1a52fa 100644 --- a/WINGs/wapplication.c +++ b/WINGs/wapplication.c @@ -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); -- 2.11.4.GIT