[libpng14] 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:43:43 -06:00
parent ff37256e4d
commit d0afab5ce3
3 changed files with 5 additions and 0 deletions

View File

@ -28,6 +28,8 @@ Changes since the last public release (1.4.19):
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 a potential null pointer dereference in png_set_text_2() (bug report
and patch by Patrick Keshishian)
Send comments/corrections/commendations to glennrp at users.sourceforge.net Send comments/corrections/commendations to glennrp at users.sourceforge.net
or to png-mng-implement at lists.sf.net (subscription required; visit or to png-mng-implement at lists.sf.net (subscription required; visit

View File

@ -3040,6 +3040,8 @@ version 1.4.20rc01 [December 27, 2016]
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.4.20 [December 29, 2016] version 1.4.20 [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 glennrp at users.sourceforge.net Send comments/corrections/commendations to glennrp at users.sourceforge.net
or to png-mng-implement at lists.sf.net (subscription required; visit or to png-mng-implement at lists.sf.net (subscription required; visit

1
png.c
View File

@ -279,6 +279,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