[libpng16] Check for info_ptr == NULL early in png_read_end() so we don't need

to run all the png_handle_*() and depend on them to return if info_ptr == NULL.
This improves the performance of png_read_end(png_ptr, NULL) and makes
it more robust against future programming errors.
This commit is contained in:
Glenn Randers-Pehrson
2014-02-17 09:12:52 -06:00
parent 37b7299b60
commit 9c5a1baea5
4 changed files with 18 additions and 7 deletions

View File

@@ -1436,7 +1436,7 @@ png_handle_iCCP(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
(sizeof local_buffer), &length,
profile + (sizeof profile_header), &size, 0);
/* Still expect a a buffer error because we expect
/* Still expect a buffer error because we expect
* there to be some tag data!
*/
if (size == 0)