elm map - fix incorrect return check of fread

this fixes CID 1132737 (a real bug)
This commit is contained in:
Carsten Haitzler 2014-01-10 16:51:06 +09:00
parent b924ac350a
commit 900ae28870
1 changed files with 2 additions and 2 deletions

View File

@ -2806,7 +2806,7 @@ _kml_parse(Elm_Map_Route *r)
f = fopen(r->fname, "rb");
if (f)
{
long sz;
unsigned long sz;
fseek(f, 0, SEEK_END);
sz = ftell(f);
@ -2817,7 +2817,7 @@ _kml_parse(Elm_Map_Route *r)
{
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_route_dump_cb, &dump);