summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2021-03-31 10:29:50 +0100
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2021-03-31 10:29:50 +0100
commit769066f606e6459192d0b6ed5069e0807cc7ae81 (patch)
tree31d535f75ce7060b986e8b76590dfa7043e413bf /src
parent15078f757b8e1e6898286fdb409c66943a7e5a8b (diff)
Evas avif loader: fix segfault when the avif loader tries to load a non avif image
Test Plan: entice is not crashing Reviewers: raster Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12254
Diffstat (limited to 'src')
-rw-r--r--src/modules/evas/image_loaders/avif/evas_image_load_avif.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/modules/evas/image_loaders/avif/evas_image_load_avif.c b/src/modules/evas/image_loaders/avif/evas_image_load_avif.c
index dd564dbc8a..e641473c89 100644
--- a/src/modules/evas/image_loaders/avif/evas_image_load_avif.c
+++ b/src/modules/evas/image_loaders/avif/evas_image_load_avif.c
@@ -250,7 +250,12 @@ evas_image_load_file_close_avif(void *loader_data)
250 Evas_Loader_Internal *loader; 250 Evas_Loader_Internal *loader;
251 251
252 loader = loader_data; 252 loader = loader_data;
253 avifDecoderDestroy(loader->decoder); 253 /*
254 * in case _head() fails (because the file is not an avif one),
255 * loader is not filled and loader->decoder is NULL
256 */
257 if (loader->decoder)
258 avifDecoderDestroy(loader->decoder);
254 free(loader_data); 259 free(loader_data);
255} 260}
256 261