summaryrefslogtreecommitdiff
path: root/src/lib/ecore_file
diff options
context:
space:
mode:
authorJihoon Kim <jihoon48.kim@samsung.com>2013-12-02 09:40:48 +0900
committerJihoon Kim <jihoon48.kim@samsung.com>2013-12-02 09:40:48 +0900
commit49511730d72aa24c1474dd2d3b0f1e0f5ab5cfd8 (patch)
tree7297801ded8c7aabe52f7977943658e4a809a562 /src/lib/ecore_file
parent069a2b027f0d669ef38bd6bc2363026b84f6c215 (diff)
fix unchecked return value of stat in ecore_file_mv
stat() function may fail and return an error code This fixes CID 1039697
Diffstat (limited to 'src/lib/ecore_file')
-rw-r--r--src/lib/ecore_file/ecore_file.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/ecore_file/ecore_file.c b/src/lib/ecore_file/ecore_file.c
index 7a42cb2391..634709f048 100644
--- a/src/lib/ecore_file/ecore_file.c
+++ b/src/lib/ecore_file/ecore_file.c
@@ -591,7 +591,8 @@ ecore_file_mv(const char *src, const char *dst)
591 591
592 // Make sure this is a regular file before 592 // Make sure this is a regular file before
593 // we do anything fancy. 593 // we do anything fancy.
594 stat(src, &st); 594 if (stat(src, &st) == -1)
595 goto FAIL;
595 if (S_ISREG(st.st_mode)) 596 if (S_ISREG(st.st_mode))
596 { 597 {
597 char *dir; 598 char *dir;