-
Notifications
You must be signed in to change notification settings - Fork 636
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
code cleanup: chunk lengths and allocaiton limits
Internal changes only. Move chunk length checks to fewer places: Change png_struct::user_chunk_malloc_max to always have a non-zero value in order to avoid the need to check for zero in multiple places. Add png_chunk_max(png_ptr), a function like macro defined in pngpriv.h which expresses all the previous checks on the various USER_LIMITS and system limitations. Replace the code which implemented such checks with png_chunk_max. Move the malloc limit length check in png_read_chunk_header to png_handle_chunk and make it conditional on the chunk type. Progressive reader: call png_read_chunk_header. Corect the handling for the pHYs. Signed-off-by: John Bowler <jbowler@acm.org>
- Loading branch information
Showing
6 changed files
with
225 additions
and
237 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
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
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
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
Oops, something went wrong.