saftery for strncpy

SVN revision: 45505
This commit is contained in:
Carsten Haitzler 2010-01-24 02:23:43 +00:00
parent a9a3813966
commit f5ab46c84e
1 changed files with 1 additions and 0 deletions

View File

@ -602,6 +602,7 @@ ecore_file_dir_get(const char *file)
if (!file) return NULL;
strncpy(buf, file, PATH_MAX);
buf[PATH_MAX - 1] = 0;
p = dirname(buf);
return strdup(p);
}