From: Carsten Haitzler (Rasterman) Date: Fri, 10 Jan 2014 07:53:43 +0000 (+0900) Subject: elm map - fix incorrect return check of fread X-Git-Tag: v1.9.0-alpha1~262 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=744ef6bb37c0f4f2fbdc297d49b2fd62824c29b2;p=platform%2Fupstream%2Felementary.git elm map - fix incorrect return check of fread this fixes CID 1132735 (real bug) --- diff --git a/src/lib/elm_map.c b/src/lib/elm_map.c index 8b1f2c735..e56eef2b0 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);