diff --git a/ANNOUNCE b/ANNOUNCE index 8e023c31d..9e2190743 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -1420,6 +1420,8 @@ Version 1.7.0beta85 [December 27, 2016] Version 1.7.0beta86 [December 29, 2016] Ported CMakeLists.txt from libpng-1.6.27rc01. + Fixed a potential null pointer dereference in png_set_text_2() (bug report + and patch by Patrick Keshishian). Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/CHANGES b/CHANGES index aecf083ed..a78c3ace7 100644 --- a/CHANGES +++ b/CHANGES @@ -5720,6 +5720,8 @@ Version 1.7.0beta85 [December 27, 2016] Version 1.7.0beta86 [December 29, 2016] Ported CMakeLists.txt from libpng-1.6.27rc01. + Fixed a potential null pointer dereference in png_set_text_2() (bug report + and patch by Patrick Keshishian) Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/png.c b/png.c index bebd17881..ca647ffdb 100644 --- a/png.c +++ b/png.c @@ -427,6 +427,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