mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-27 00:20:53 +01:00
[PR #1327] conformance: validate PNG chunk structure before reading pixels (DRAFT-259) #1356
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#1356
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/1327
Author: @fin-github
Created: 11/24/2026
Status: 🔄 Open
Base:
main← Head:codex/draft-259📝 Commits (2)
e7b24a6Reject invalid critical PNG chunk structure in conformance reads5543594Reject non-letter PNG chunk types after review📊 Changes
2 files changed (+52 additions, -0 deletions)
View changed files
📝
tests/test_conformance_png_transparency.py(+32 -0)📝
tools/conformance/compare.py(+20 -0)📄 Description
Claimed in the coordination issue as: DRAFT-259 (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7145552458)
What and why
Supersedes carried-over draft #259. Both of Tayar's original commits from
old-pr/9989were cherry-picked with-xontomainat4a50cafc7.The comparison tool now rejects invalid PNG chunk layout and chunk types before it uses the pixels. Valid RGB and RGBA images with consecutive IDAT chunks and supported optional chunks still decode.
Tested
On baseline
4a50cafc7, ten synthetic invalid-structure subtests failed because the comparison tool accepted the inputs.After the fix, all six PNG tests and all 22 comparison selftest checks passed. Touched-file compilation, changed-file game-data and whitespace checks passed. Both merge simulations were clean.
Windows 11 build 26200, Python 3.14.4, synthetic inputs only.
GPUs tested: n/a (CPU-only).
AI-assisted (Codex): original patch, rebase and verification.
Checklist
mainand merges cleanly.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.