q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=91bf465d52db7270d3644e6eb22acb0e29da8d67

commit 91bf465d52db7270d3644e6eb22acb0e29da8d67
Author: Daniel Kolesa <[email protected]>
Date:   Mon Aug 4 09:58:32 2014 +0100

    eolian/generator: coverity fix
    
    Fixes CID 1229130 (ignoring number of bytes read)
---
 src/bin/eolian/main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/bin/eolian/main.c b/src/bin/eolian/main.c
index 5be48ff..2b66a89 100644
--- a/src/bin/eolian/main.c
+++ b/src/bin/eolian/main.c
@@ -67,7 +67,8 @@ _read_file(char *filename, Eina_Strbuf *buffer)
              ERR("Couldnt allocate memory for file %s", filename);
              goto end;
           }
-        if (!fread(content, file_size, 1, fd))
+        long actual_size = (long)fread(content, file_size, 1, fd);
+        if (actual_size != file_size)
           {
              ERR("Couldnt read the %ld bytes of file %s", file_size, filename);
              free(content);

-- 


Reply via email to