-
Notifications
You must be signed in to change notification settings - Fork 145
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Treat most auxiliary chunk errors as benign.
This commit is based on what `png_handle_...` functions do in `libpng/pngrutil.c`: * Chunks appearing before IHDR are a fatal error. `png` crate already detects this in a single, centeralized location and reports `ChunkBeforeIhdr` error. * Chunks appearing after IDAT chunk, or duplicated chunks are treated as a benign error and ignored. Note that there are some places where `png` crate is more permissive than `libpng`, for example `parse_...` functions in general don't complain if the chunk is longer than necessary.
- Loading branch information
1 parent
819d91e
commit 014877a
Showing
1 changed file
with
110 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters