[PR #1331] conformance: the PNG reader rejects an invalid critical chunk structure (OLD-9989) #1362

Open
opened 2026-11-26 20:20:59 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/1331
Author: @fin-github
Created: 11/24/2026
Status: 🔄 Open

Base: main ← Head: takeover/old-9989-png-critical-chunks


📝 Commits (2)

  • 1fd64c5 Reject invalid critical PNG chunk structure in conformance reads
  • 741f4aa Reject 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: OLD-9989 (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7145581073)

Supersedes draft #259, carried over from old upstream PR 9989 in the original repository. This is the same change cherry-picked onto current main (git cherry-pick -x), with the original author (Tayar) kept on every commit. The change and its explanation are theirs; see #259 for the original description.

Tested

Windows 11 Pro 26200, CPython 3.14.4, on main 4a50cafc7. No GPU, no game files.

  • On this branch: tests/test_conformance_png_transparency.py: 6 tests OK
  • The same test file(s) with main's code: test_invalid_critical_chunk_structure_is_rejected fails in 6 subtests (duplicate IHDR, IEND placement, IDAT order, unknown critical chunk, …), so the tests still catch the bug on current main.
  • scripts/check_no_game_data.py on the changed files and tests/test_text_write_line_endings.py: clean.

GPUs tested: n/a

AI-assisted: yes (Claude Code). The cherry-pick and the test runs were done by the agent; the code is the original author's.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/1331 **Author:** [@fin-github](https://github.com/fin-github) **Created:** 11/24/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `takeover/old-9989-png-critical-chunks` --- ### 📝 Commits (2) - [`1fd64c5`](https://github.com/ubiquitarianism/leonida/commit/1fd64c5dff60a7c9b98ce7ce0b68546d50c5a05d) Reject invalid critical PNG chunk structure in conformance reads - [`741f4aa`](https://github.com/ubiquitarianism/leonida/commit/741f4aa57912d497d0f6a8d968f91f3e66f8ac38) Reject non-letter PNG chunk types after review ### 📊 Changes **2 files changed** (+52 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `tests/test_conformance_png_transparency.py` (+32 -0) 📝 `tools/conformance/compare.py` (+20 -0) </details> ### 📄 Description Claimed in the coordination issue as: `OLD-9989` (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7145581073) Supersedes draft #259, carried over from old upstream PR 9989 in the original repository. This is the same change cherry-picked onto current `main` (`git cherry-pick -x`), with the original author (Tayar) kept on every commit. The change and its explanation are theirs; see #259 for the original description. ### Tested Windows 11 Pro 26200, CPython 3.14.4, on `main` 4a50cafc7. No GPU, no game files. - On this branch: `tests/test_conformance_png_transparency.py`: 6 tests OK - The same test file(s) with `main`'s code: `test_invalid_critical_chunk_structure_is_rejected` fails in 6 subtests (duplicate IHDR, IEND placement, IDAT order, unknown critical chunk, …), so the tests still catch the bug on current `main`. - `scripts/check_no_game_data.py` on the changed files and `tests/test_text_write_line_endings.py`: clean. GPUs tested: n/a AI-assisted: yes (Claude Code). The cherry-pick and the test runs were done by the agent; the code is the original author's. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#1362
No description provided.