diff options
author | Cedric BAIL <cedric.bail@free.fr> | 2010-01-20 12:41:22 +0000 |
---|---|---|
committer | Cedric BAIL <cedric.bail@free.fr> | 2010-01-20 12:41:22 +0000 |
commit | c354216b27c317907f686f785762291845ea25d2 (patch) | |
tree | 4bd752599dbc575d96180c2ff56b96a8b22ea9ef /legacy/ecore/src/lib/ecore_file/ecore_file.c | |
parent | efec5623148c654768be819a9424692ab432ea23 (diff) |
* ecore: Handle NULL in ecore_file_dir_get.
SVN revision: 45352
Diffstat (limited to '')
-rw-r--r-- | legacy/ecore/src/lib/ecore_file/ecore_file.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/legacy/ecore/src/lib/ecore_file/ecore_file.c b/legacy/ecore/src/lib/ecore_file/ecore_file.c index 1bfcaee111..2dcff23b68 100644 --- a/legacy/ecore/src/lib/ecore_file/ecore_file.c +++ b/legacy/ecore/src/lib/ecore_file/ecore_file.c | |||
@@ -600,6 +600,7 @@ ecore_file_dir_get(const char *file) | |||
600 | char *p; | 600 | char *p; |
601 | char buf[PATH_MAX]; | 601 | char buf[PATH_MAX]; |
602 | 602 | ||
603 | if (!file) return NULL; | ||
603 | strncpy(buf, file, PATH_MAX); | 604 | strncpy(buf, file, PATH_MAX); |
604 | p = dirname(buf); | 605 | p = dirname(buf); |
605 | return strdup(p); | 606 | return strdup(p); |