From e7fa216dea24a081545c6c0e3b7e3a395d388402 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Fri, 10 Jan 2014 16:52:44 +0900 Subject: [PATCH] elm map - fix incorrect return check of fread this fixes CID 1132736 (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 67aa3d9..8b1f2c7 100644 --- a/src/lib/elm_map.c +++ b/src/lib/elm_map.c @@ -2896,7 +2896,7 @@ _name_parse(Elm_Map_Name *n) f = fopen(n->fname, "rb"); if (f) { - long sz; + unsigned long sz; fseek(f, 0, SEEK_END); sz = ftell(f); @@ -2907,7 +2907,7 @@ _name_parse(Elm_Map_Name *n) { 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_cb, &dump); -- 2.7.4