mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng16] Work around for duplicate row start calls; added warning messages.
This turns on PNG_FLAG_DETECT_UNINITIALIZED to detect app code that fails to call one of the 'start' routines (not enabled in libpng-1.5 because it is technically an API change, since it did normally work before.) It also makes duplicate calls to png_read_start_row (an internal function called at the start of the image read) benign, as they were before changes to use png_inflate_claim. Somehow webkit is causing this to happen; this is probably a mis-feature in the zlib changes so this commit is only a work-round.
This commit is contained in:
committed by
Glenn Randers-Pehrson
parent
f5dcba6b9b
commit
0c11b5f8e7
@@ -50,6 +50,11 @@ png_create_read_struct_2,(png_const_charp user_png_ver, png_voidp error_ptr,
|
||||
{
|
||||
png_ptr->mode = PNG_IS_READ_STRUCT;
|
||||
|
||||
/* Turn this on for all transforms in an attempt to detect failure to call
|
||||
* the image reading start stuff.
|
||||
*/
|
||||
png_ptr->flags |= PNG_FLAG_DETECT_UNINITIALIZED;
|
||||
|
||||
/* Added in libpng-1.6.0; this can be used to detect a read structure if
|
||||
* required (it will be zero in a write structure.)
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user