Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

pngimage: clean up on user/internal errors #657

Closed
wants to merge 2 commits into from

Conversation

jbowler
Copy link
Contributor

@jbowler jbowler commented Feb 13, 2025

pngimage: The code simply exited with a return code of 99 in the event
of a user error including giving pngimage invalid PNG files and an
internal error. It now attempts to clean up the state before doing so,
matching the normal behaviour.

pngimage: Non-ISO use of setjmp(3) corrected.

pngerror.c: Failure to call png_image_free on a false result from a
png_safe_execute function call fixed. This was a regression caused by
the 'volatile' clean-up. Not normally detectable because png_image_free
will often be called by the application.

Signed-off-by: John Bowler jbowler@acm.org

svgeesus and others added 2 commits February 12, 2025 13:48
Update man page to latest PNG 3e draft
pngimage: The code simply exited with a return code of 99 in the event
of a user error including giving pngimage invalid PNG files and an
internal error.  It now attempts to clean up the state before doing so,
matching the normal behaviour.

pngimage: Non-ISO use of setjmp(3) corrected.

pngerror.c: Failure to call png_image_free on a false result from a
png_safe_execute function call fixed.  This was a regression caused by
the 'volatile' clean-up.  Not normally detectable because png_image_free
will often be called by the application.

Signed-off-by: John Bowler <jbowler@acm.org>
@jbowler
Copy link
Contributor Author

jbowler commented Feb 13, 2025

Fixes #655 and should fix #656; pngimage "leaks" if given an invalid file to check (one which errors out on read, not one which just warns).

@ctruta
Copy link
Member

ctruta commented Feb 17, 2025

Integrated in trunk -- many thanks.

@ctruta ctruta closed this Feb 17, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants