raster pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=744ef6bb37c0f4f2fbdc297d49b2fd62824c29b2

commit 744ef6bb37c0f4f2fbdc297d49b2fd62824c29b2
Author: Carsten Haitzler (Rasterman) <[email protected]>
Date:   Fri Jan 10 16:53:43 2014 +0900

    elm map - fix incorrect return check of fread
    
    this fixes CID 1132735 (real bug)
---
 src/lib/elm_map.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/elm_map.c b/src/lib/elm_map.c
index 8b1f2c7..e56eef2 100644
--- a/src/lib/elm_map.c
+++ b/src/lib/elm_map.c
@@ -2937,7 +2937,7 @@ _name_list_parse(Elm_Map_Name_List *nl)
    f = fopen(nl->fname, "rb");
    if (f)
      {
-        long sz;
+        unsigned long sz;
 
         fseek(f, 0, SEEK_END);
         sz = ftell(f);
@@ -2948,7 +2948,7 @@ _name_list_parse(Elm_Map_Name_List *nl)
                {
                   memset(buf, 0, sz + 1);
                   rewind(f);
-                  if (fread(buf, 1, sz, f))
+                  if (fread(buf, 1, sz, f) == sz)
                     {
                        eina_simple_xml_parse
                          (buf, sz, EINA_TRUE, _xml_name_dump_list_cb, nl);

-- 


Reply via email to