stefan pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=40b395666ba8d58051881ca2121dedbae5a40ef3

commit 40b395666ba8d58051881ca2121dedbae5a40ef3
Author: Stefan Schmidt <[email protected]>
Date:   Fri Aug 8 11:09:56 2014 +0200

    ecore_file: Check return value of chmod()
    
    Handle the error case here if chmod() fails.
    
    CID: 1039696
---
 src/lib/ecore_file/ecore_file.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/ecore_file/ecore_file.c b/src/lib/ecore_file/ecore_file.c
index c410393..9a3c6d0 100644
--- a/src/lib/ecore_file/ecore_file.c
+++ b/src/lib/ecore_file/ecore_file.c
@@ -613,7 +613,7 @@ ecore_file_mv(const char *src, const char *dst)
                     goto FAIL;
 
                   // Set file permissions of temp file to match src
-                  chmod(buf, st.st_mode);
+                  if (chmod(buf, st.st_mode) == -1) goto FAIL;
 
                   // Try to atomically move temp file to dst
                   if (rename(buf, dst))

-- 


Reply via email to