mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng17] Reverted incorrect test on unknown chunk location.
This commit is contained in:
12
pngset.c
12
pngset.c
@@ -1213,17 +1213,6 @@ png_set_unknown_chunks(png_structrp png_ptr,
|
||||
return;
|
||||
}
|
||||
|
||||
if ((np->location & (PNG_HAVE_IHDR|PNG_HAVE_PLTE|PNG_AFTER_IDAT)) == 0)
|
||||
{
|
||||
png_free(png_ptr, np);
|
||||
np = NULL;
|
||||
png_chunk_report(png_ptr,
|
||||
"invalid chunk location in png_set_unknown_chunks",
|
||||
PNG_CHUNK_WRITE_ERROR);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
png_free(png_ptr, info_ptr->unknown_chunks);
|
||||
info_ptr->unknown_chunks = np; /* safe because it is initialized */
|
||||
info_ptr->free_me |= PNG_FREE_UNKN;
|
||||
@@ -1302,7 +1291,6 @@ png_set_unknown_chunk_location(png_const_structrp png_ptr, png_inforp info_ptr,
|
||||
}
|
||||
#endif /* STORE_UNKNOWN_CHUNKS */
|
||||
|
||||
|
||||
#ifdef PNG_MNG_FEATURES_SUPPORTED
|
||||
png_uint_32 PNGAPI
|
||||
png_permit_mng_features (png_structrp png_ptr, png_uint_32 mng_features)
|
||||
|
||||
Reference in New Issue
Block a user