mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng16] Removed erroneous setting of DETECT_UNINITIALIZED and added more
checks. The code now does a png_error if an attempt is made to do the row initialization twice; this is an application error and it has serious consequences because the transform data in png_struct is changed by each call.
This commit is contained in:
committed by
Glenn Randers-Pehrson
parent
0c11b5f8e7
commit
66efa24241
11
pngrutil.c
11
pngrutil.c
@@ -4105,17 +4105,6 @@ png_read_start_row(png_structrp png_ptr)
|
||||
|
||||
png_debug(1, "in png_read_start_row");
|
||||
|
||||
/* Because init_read_transformations, below, modifies values in png_struct
|
||||
* it will not always work correctly if called twice. This error detects
|
||||
* that condition but just warns, because it does tend to work most of the
|
||||
* time.
|
||||
*/
|
||||
if (png_ptr->flags & PNG_FLAG_ROW_INIT)
|
||||
{
|
||||
png_warning(png_ptr, "unexpected duplicate call to png_read_start_row");
|
||||
png_ptr->zowner = 0; /* release previous claim */
|
||||
}
|
||||
|
||||
#ifdef PNG_READ_TRANSFORMS_SUPPORTED
|
||||
png_init_read_transformations(png_ptr);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user