forked from enlightenment/efl
From: Jiyoun Park <jy0703.park@samsung.com>
Subject: [E-devel] [Patch] Evas_image_load_gif bug fix I found if gif file didn't have colormap, evas make segmentation fault. So I add null check code of the gif color map . SVN revision: 60337
This commit is contained in:
parent
21713b5991
commit
8729820393
|
@ -260,6 +260,17 @@ evas_image_load_file_data_gif(Image_Entry *ie, const char *file, const char *key
|
|||
|
||||
bg = gif->SBackGroundColor;
|
||||
cmap = (gif->Image.ColorMap ? gif->Image.ColorMap : gif->SColorMap);
|
||||
if (!cmap)
|
||||
{
|
||||
DGifCloseFile(gif);
|
||||
for (i = 0; i < h; i++)
|
||||
{
|
||||
free(rows[i]);
|
||||
}
|
||||
free(rows);
|
||||
*error = EVAS_LOAD_ERROR_CORRUPT_FILE;
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
ptr = evas_cache_image_pixels(ie);
|
||||
per_inc = 100.0 / (((double)w) * h);
|
||||
|
|
Loading…
Reference in New Issue