[PR #2213] [CLOSED] conformance: reject invalid critical PNG chunk structure #2217

Closed
opened 2026-11-26 21:20:27 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/2213
Author: @whoalin1
Created: 11/26/2026
Status: ❌ Closed

Base: main ← Head: conformance-png-critical-chunks


📝 Commits (1)

  • a0d3859 conformance: reject invalid critical PNG chunk structure

📊 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

Summary

  • reject PNG chunk types that are not four ASCII letters
  • reject unknown critical chunks, duplicate IHDR/PLTE, invalid or misplaced PLTE, non-consecutive IDAT, and non-empty IEND
  • keep consecutive IDAT chunks and valid ancillary chunks supported
  • add synthetic malformed-structure and valid-structure regressions

Item: CONFORMANCE-PNG-CRITICAL-CHUNKS

This carries forward the still-uncarried fix in old-pr/9989, originally written by lucastayaralvarenga-ui, reapplied and verified on current main.

Tests

Under the local machine coordination lock:

  • control: the new malformed-structure regressions fail on the unpatched reader (10 failing subcases)
  • fixed: python -I tests/test_conformance_png_transparency.py — 6 tests, OK
  • python -I tools/conformance/compare.py selftest — pass
  • python -m compileall -q tools/conformance/compare.py tests/test_conformance_png_transparency.py — pass
  • git diff --cached --check — pass

No game files or GPU.

AI-assisted with Devin.


🔄 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/2213 **Author:** [@whoalin1](https://github.com/whoalin1) **Created:** 11/26/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `conformance-png-critical-chunks` --- ### 📝 Commits (1) - [`a0d3859`](https://github.com/ubiquitarianism/leonida/commit/a0d3859540aff83e3a50e75b6617724dae4c6400) conformance: reject invalid critical PNG chunk structure ### 📊 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 ## Summary - reject PNG chunk types that are not four ASCII letters - reject unknown critical chunks, duplicate IHDR/PLTE, invalid or misplaced PLTE, non-consecutive IDAT, and non-empty IEND - keep consecutive IDAT chunks and valid ancillary chunks supported - add synthetic malformed-structure and valid-structure regressions Item: CONFORMANCE-PNG-CRITICAL-CHUNKS This carries forward the still-uncarried fix in old-pr/9989, originally written by lucastayaralvarenga-ui, reapplied and verified on current main. ## Tests Under the local machine coordination lock: - control: the new malformed-structure regressions fail on the unpatched reader (10 failing subcases) - fixed: `python -I tests/test_conformance_png_transparency.py` — 6 tests, OK - `python -I tools/conformance/compare.py selftest` — pass - `python -m compileall -q tools/conformance/compare.py tests/test_conformance_png_transparency.py` — pass - `git diff --cached --check` — pass No game files or GPU. AI-assisted with Devin. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
4ld0 2026-11-26 21:20:27 +01:00
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#2217
No description provided.