[libpng12] Fixed a potential null pointer dereference in png_set_text_2()

(bug report and patch by Patrick Keshishian).
This commit is contained in:
Glenn Randers-Pehrson 2016-12-29 07:34:51 -06:00
parent 302c322ce9
commit 794a15fad6
3 changed files with 6 additions and 1 deletions

View File

@ -42,6 +42,8 @@ Changes since the last public release (1.2.56):
Fix typos in libpng.3 synopses (Eric S. Raymond). Fix typos in libpng.3 synopses (Eric S. Raymond).
Fixed undefined behavior in png_push_save_buffer(). Do not call Fixed undefined behavior in png_push_save_buffer(). Do not call
memcpy() with a null source, even if count is zero (Leon Scroggins III). memcpy() with a null source, even if count is zero (Leon Scroggins III).
Fixed 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 Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit (subscription required; visit

View File

@ -2925,7 +2925,9 @@ version 1.2.57rc01 [December 27, 2016]
Fixed undefined behavior in png_push_save_buffer(). Do not call Fixed undefined behavior in png_push_save_buffer(). Do not call
memcpy() with a null source, even if count is zero (Leon Scroggins III). memcpy() with a null source, even if count is zero (Leon Scroggins III).
version 1.0.67 and 1.2.57 [December 29, 2016] versions 1.0.67 and 1.2.57 [December 29, 2016]
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 Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit (subscription required; visit

1
png.c
View File

@ -393,6 +393,7 @@ png_free_data(png_structp png_ptr, png_infop info_ptr, png_uint_32 mask,
png_free(png_ptr, info_ptr->text); png_free(png_ptr, info_ptr->text);
info_ptr->text = NULL; info_ptr->text = NULL;
info_ptr->num_text=0; info_ptr->num_text=0;
info_ptr->max_text=0;
} }
} }
#endif #endif