[PR #1119] gdk_runtime_calls: validate table lookup shapes (GDK-TABLE-SHAPE) #1154

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

📋 Pull Request Information

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

Base: main ← Head: fix/gdk-table-shape


📝 Commits (1)

  • 4a18d32 gdk_runtime_calls: validate table lookup shapes (GDK-TABLE-SHAPE)

📊 Changes

2 files changed (+77 additions, -0 deletions)

View changed files

➕ tests/test_gdk_table_shape.py (+66 -0)
📝 tools/gdk_runtime_calls.py (+11 -0)

📄 Description

Item ID: GDK-TABLE-SHAPE

Validates the JSON structure of GDK class/interface tables in tools/gdk_runtime_calls.py:RuntimeTable.__init__() before opening or inspecting any PE image.

Changes

  • tools/gdk_runtime_calls.py (RuntimeTable.__init__): Validates that the parsed document is a dict, that classes and interfaces are dicts, that each entry is a dict, and that every entry's id is a non-empty str, raising a descriptive ValueError on malformed inputs.
  • tests/test_gdk_table_shape.py: Adds synthetic tests covering non-dict roots, non-dict classes/interfaces, non-dict entries, and missing/empty/non-string id values before PE inspection.

Verification

  • AI-assisted; synthetic tests only, no game data (python -I scripts/check_no_game_data.py).

🔄 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/1119 **Author:** [@Taffyyy-ops](https://github.com/Taffyyy-ops) **Created:** 11/24/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/gdk-table-shape` --- ### 📝 Commits (1) - [`4a18d32`](https://github.com/ubiquitarianism/leonida/commit/4a18d32b6efc03b020cad4a64bb5ba188ce34c03) gdk_runtime_calls: validate table lookup shapes (GDK-TABLE-SHAPE) ### 📊 Changes **2 files changed** (+77 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `tests/test_gdk_table_shape.py` (+66 -0) 📝 `tools/gdk_runtime_calls.py` (+11 -0) </details> ### 📄 Description Item ID: `GDK-TABLE-SHAPE` Validates the JSON structure of GDK class/interface tables in `tools/gdk_runtime_calls.py:RuntimeTable.__init__()` before opening or inspecting any PE image. ### Changes - **`tools/gdk_runtime_calls.py` (`RuntimeTable.__init__`):** Validates that the parsed document is a `dict`, that `classes` and `interfaces` are `dict`s, that each entry is a `dict`, and that every entry's `id` is a non-empty `str`, raising a descriptive `ValueError` on malformed inputs. - **`tests/test_gdk_table_shape.py`:** Adds synthetic tests covering non-dict roots, non-dict `classes`/`interfaces`, non-dict entries, and missing/empty/non-string `id` values before PE inspection. ### Verification - AI-assisted; synthetic tests only, no game data (`python -I scripts/check_no_game_data.py`). --- <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#1154
No description provided.