diff options
author | Cedric Bail <cedric.bail@samsung.com> | 2013-11-07 19:56:04 +0900 |
---|---|---|
committer | Cedric Bail <cedric.bail@samsung.com> | 2013-11-07 19:56:04 +0900 |
commit | 1b9d5f9a3e827ef74225be781824c6a76484a014 (patch) | |
tree | c711f2e3d9c76e7b104fd7b9f559815361039c19 | |
parent | 8efe24c87dbd2ff6e0f559c1eb4bb22cc275506e (diff) | |
download | efl-1b9d5f9a3e827ef74225be781824c6a76484a014.tar.gz |
evas: Nice catch from Coverity, fix defect CID 1126097, 1126096 and 1126088.
-rw-r--r-- | src/modules/evas/loaders/gif/evas_image_load_gif.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/modules/evas/loaders/gif/evas_image_load_gif.c b/src/modules/evas/loaders/gif/evas_image_load_gif.c index 3f2ef53f11..6a4d59bbe1 100644 --- a/src/modules/evas/loaders/gif/evas_image_load_gif.c +++ b/src/modules/evas/loaders/gif/evas_image_load_gif.c @@ -413,7 +413,6 @@ evas_image_load_file_head_gif2(void *loader_data, if (IMG_TOO_BIG(prop->w, prop->h)) LOADERR(EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED); LOADERR(EVAS_LOAD_ERROR_GENERIC); - goto on_error; } // walk through gif records in file to figure out info do @@ -543,7 +542,7 @@ evas_image_load_file_data_gif2(void *loader_data, Evas_Image_Animated *animated = loader->animated; Eina_File *f = loader->f; Eina_Bool ret = EINA_FALSE; - File_Info fi; + File_Info fi = { NULL, 0, 0 }; GifRecordType rec; GifFileType *gif = NULL; Image_Entry_Frame *frame; @@ -738,7 +737,7 @@ on_ok: // if it was an animated image we need to copy the data to the // pixels for the image from the frame holding the data - if (animated->animated) + if (animated->animated && frame->data) memcpy(pixels, frame->data, prop->w * prop->h * sizeof (DATA32)); prop->premul = EINA_TRUE; |