From 24b38db49a8cb4a9cb6d37622b5ae64767525772 Mon Sep 17 00:00:00 2001 From: Daniel Juyung Seo Date: Tue, 29 Mar 2011 11:37:05 +0900 Subject: [PATCH] [ecore_file.c] NULL check before using strcmp(). --- src/lib/ecore_file/ecore_file.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/ecore_file/ecore_file.c b/src/lib/ecore_file/ecore_file.c index cd29a33..906c652 100644 --- a/src/lib/ecore_file/ecore_file.c +++ b/src/lib/ecore_file/ecore_file.c @@ -154,6 +154,7 @@ EAPI Eina_Bool ecore_file_exists(const char *file) { struct stat st; + if (!file) return EINA_FALSE; /*Workaround so that "/" returns a true, otherwise we can't monitor "/" in ecore_file_monitor*/ if (stat(file, &st) < 0 && strcmp(file, "/")) return EINA_FALSE; -- 2.7.4