mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[legacy] Check for up->location !PNG_AFTER_IDAT when writing unknown chunks
before IDAT.
This commit is contained in:
@@ -295,6 +295,7 @@ png_write_info(png_structp png_ptr, png_infop info_ptr)
|
||||
if (keep != PNG_HANDLE_CHUNK_NEVER &&
|
||||
up->location && (up->location & PNG_HAVE_PLTE) &&
|
||||
!(up->location & PNG_HAVE_IDAT) &&
|
||||
!(up->location & PNG_AFTER_IDAT) &&
|
||||
((up->name[3] & 0x20) || keep == PNG_HANDLE_CHUNK_ALWAYS ||
|
||||
(png_ptr->flags & PNG_FLAG_KEEP_UNSAFE_CHUNKS)))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user