Files
libpng/pngwrite.c
Cosmin Truta e6c5bf46c4 Ensure that only one eXIf chunk is written in the entire datastream
EXIF data can be stored in an eXIf chunk before IDAT, or after IDAT,
but the entire PNG datastream may contain one eXIf chunk at most.

Introduce the private mode flag PNG_WROTE_eXIf, which is meant to be
used like the PNG_WROTE_tIME flag. The eXIf chunk and the tIME chunk
have the same ordering rules (i.e. no constraints are imposed), and
the same multiplicity rules (i.e. no multiples are allowed), and they
should be initialized and checked using the same algorithm.

This fixes commit cd03aaf7bf,
previously reverted in 3d57708c91.

Reported-by: Ben Bullock <benkasminbullock@gmail.com>
2023-06-21 16:16:07 +03:00

75 KiB