Bug fix: Fix potential double-free 11/284611/2 accepted/tizen/unified/20221128.014945
authorjiyong.min <jiyong.min@samsung.com>
Tue, 22 Nov 2022 00:59:04 +0000 (09:59 +0900)
committerjiyong.min <jiyong.min@samsung.com>
Wed, 23 Nov 2022 07:28:06 +0000 (16:28 +0900)
 - If an error occurred on 517 line after 'tile_image' is released
   on line 537, double-free may occur.

Change-Id: I1bfe863caaa06ffb3560960238e7aac39c71475e

packaging/libheif.spec
src/heif_decoder.c

index c9c19911cdba0350ce0ddc48998ca8ae842c0eb3..4e1786d3a6feb7b1d95a4f84fb9eb7581ec93317 100644 (file)
@@ -1,6 +1,6 @@
 Name:       libheif
 Summary:    Multimedia Framework Library for HEIF(ISO/IEC 23008-12) image
-Version:    0.0.8
+Version:    0.0.9
 Release:    0
 Group:      Multimedia/Libraries
 License:    Apache-2.0
index 4eadb406ab3e3084db5919ede4cbd5cb91fcb09c..912d48a7ffccf69c38f0d107709da7204e27e7b2 100644 (file)
@@ -535,6 +535,7 @@ static int __decode_grid_image(heif_itemtable_h item_table, heif_color_format_e
                        pos_x = 0;
                }
                heif_decoder_destroy_image(tile_image);
+               tile_image = NULL;
 
                if (ret != LIBHEIF_ERROR_NONE) {
                        heif_error("__combine_tile_image fail (%d)", ret);