fix unchecked return value of stat in ecore_file_mv

stat() function may fail and return an error code

This fixes CID 1039697
This commit is contained in:
Jihoon Kim 2013-12-02 09:40:48 +09:00
parent 069a2b027f
commit 49511730d7
1 changed files with 2 additions and 1 deletions

View File

@ -591,7 +591,8 @@ ecore_file_mv(const char *src, const char *dst)
// Make sure this is a regular file before
// we do anything fancy.
stat(src, &st);
if (stat(src, &st) == -1)
goto FAIL;
if (S_ISREG(st.st_mode))
{
char *dir;