Skip to content

image-png.c: Handle libpng errors via longjmp()/setjmp()#168

Merged
tillkamppeter merged 1 commit into
OpenPrinting:masterfrom
zdohnal:handle-png-errors
Jul 23, 2026
Merged

image-png.c: Handle libpng errors via longjmp()/setjmp()#168
tillkamppeter merged 1 commit into
OpenPrinting:masterfrom
zdohnal:handle-png-errors

Conversation

@zdohnal

@zdohnal zdohnal commented Jul 23, 2026

Copy link
Copy Markdown
Member

Libpng expects callers to set their own error handlers if they don't want to abort the whole process, and this has to be handled by longjmp()/setjmp().

It follows the C standard, so any C-standard compliant compiler should work fine. Setting pointers as volatile is to prevent possible undefined behavior.

Fixes CVE-2026-64612

Assisted-by: Claude Code by Anthropic

Libpng expects callers to set their own error handlers if they don't
want to abort the whole process, and this has to be handled by
longjmp()/setjmp().

It follows the C standard, so any C-standard compliant compiler should
work fine. Setting pointers as volatile is to prevent possible undefined
behavior.

Fixes CVE-2026-64612

Assisted-by: Claude Code by Anthropic
@zdohnal
zdohnal requested a review from tillkamppeter July 23, 2026 08:43
@tillkamppeter
tillkamppeter merged commit e8888af into OpenPrinting:master Jul 23, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants