evas xpm loader - fix xpm loader overrun check

coverity CID 1039596 - the code actually was wrong. do not multiple by
sizeof(DATA32) for ptr compare here.
This commit is contained in:
Carsten Haitzler 2014-08-14 19:53:24 +09:00
parent 95a02295c1
commit eeab470cf1
1 changed files with 1 additions and 1 deletions

View File

@ -632,7 +632,7 @@ evas_image_load_file_xpm(Eina_File *f, Evas_Image_Property *prop, void *pixels,
if (!tl) break;
line = tl;
}
if (((ptr) && ((ptr - head) >= (w * h * (int)sizeof(DATA32)))) ||
if (((ptr) && ((ptr - head) >= (w * h))) ||
((context > 1) && (count >= size)))
break;
}