Apply CVE-2016-10087 fix null-pointer-dereference bug in png_set_text_2() 02/127702/2 accepted/tizen/unified/20170518.182519 submit/tizen/20170518.062407 submit/tizen/20170608.062931 submit/tizen/20170609.014843 tizen_4.0.m1_release
authorJiyong Min <jiyong.min@samsung.com>
Fri, 28 Apr 2017 09:40:07 +0000 (18:40 +0900)
committerJiyong Min <jiyong.min@samsung.com>
Tue, 2 May 2017 00:12:41 +0000 (09:12 +0900)
Fixed a potential null pointer dereference in png_set_text_2() (bug report
and patch by Patrick Keshishian).
https://nvd.nist.gov/vuln/detail/CVE-2016-10087

Change-Id: Ie90ccd0772335cbf0715bfd6da0a3d5c1b6eff99
Signed-off-by: Jiyong Min <jiyong.min@samsung.com>
png.c [changed mode: 0644->0755]

diff --git a/png.c b/png.c
old mode 100644 (file)
new mode 100755 (executable)
index 1d1bde5..4a9d85c
--- a/png.c
+++ b/png.c
@@ -477,6 +477,7 @@ png_free_data(png_const_structrp png_ptr, png_inforp info_ptr, png_uint_32 mask,
          png_free(png_ptr, info_ptr->text);
          info_ptr->text = NULL;
          info_ptr->num_text = 0;
+         info_ptr->max_text = 0;
       }
    }
 #endif