summaryrefslogtreecommitdiff
path: root/legacy/ecore/src/lib/ecore_file/ecore_file.c
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2010-01-24 02:23:43 +0000
committerCarsten Haitzler <raster@rasterman.com>2010-01-24 02:23:43 +0000
commitf5ab46c84e61273f8d13c09a48affa603ffc127e (patch)
tree1fc69d386a663f72a57f1a1c74df4bca6ab5a6f4 /legacy/ecore/src/lib/ecore_file/ecore_file.c
parenta9a38139663460744754b91d669e5667db26b71c (diff)
saftery for strncpy
SVN revision: 45505
Diffstat (limited to '')
-rw-r--r--legacy/ecore/src/lib/ecore_file/ecore_file.c1
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 2dcff23b68..8e37e42792 100644
--- a/legacy/ecore/src/lib/ecore_file/ecore_file.c
+++ b/legacy/ecore/src/lib/ecore_file/ecore_file.c
@@ -602,6 +602,7 @@ ecore_file_dir_get(const char *file)
602 602
603 if (!file) return NULL; 603 if (!file) return NULL;
604 strncpy(buf, file, PATH_MAX); 604 strncpy(buf, file, PATH_MAX);
605 buf[PATH_MAX - 1] = 0;
605 p = dirname(buf); 606 p = dirname(buf);
606 return strdup(p); 607 return strdup(p);
607} 608}