[PR #696] find_hash_lookup: clamp raw section sizes and validate window and top parameters (OLD-9792) #736

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

📋 Pull Request Information

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

Base: main ← Head: feat/find-hash-lookup-bounds


📝 Commits (1)

  • aa9e925 find_hash_lookup: clamp raw section sizes and validate window and top parameters

📊 Changes

2 files changed (+86 additions, -1 deletions)

View changed files

📝 tests/test_find_hash_lookup.py (+77 -0)
📝 tools/find_hash_lookup.py (+9 -1)

📄 Description

Related issues: #14, #17, #18 (restoring old upstream PR 9792, author restoration for draft PR #70).

What and why

Restores original pull request OLD-9792 authored by @abnalstlll-byte:

  • Enforces strict section size clamping in \ ools/find_hash_lookup.py\ to prevent out-of-bounds slicing on truncated PE sections.
  • Validates --window\ and --top\ parameters against non-positive integers, returning clear command-line error messages.
  • Comprehensive unit test coverage in \ ests/test_find_hash_lookup.py\ (12/12 PASS).

Tested

  • Windows 11 x64, Python 3.14 / 3.12:
    • \python -I tests/test_find_hash_lookup.py: 12/12 PASS.
    • \python -I scripts/check_no_game_data.py\ on changed files: PASS.
  • Clean merge against \ubi/main\ (0 conflicts).

Checklist

  • No proprietary payloads, game-derived files, keys, or protection workarounds.
  • Standard library only (\python -I).
  • Preserves author attribution and original PR commit provenance.

🔄 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/696 **Author:** [@abnalstlll-byte](https://github.com/abnalstlll-byte) **Created:** 11/24/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `feat/find-hash-lookup-bounds` --- ### 📝 Commits (1) - [`aa9e925`](https://github.com/ubiquitarianism/leonida/commit/aa9e9251f925608c7dc48d0629f35a9f55a587e0) find_hash_lookup: clamp raw section sizes and validate window and top parameters ### 📊 Changes **2 files changed** (+86 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `tests/test_find_hash_lookup.py` (+77 -0) 📝 `tools/find_hash_lookup.py` (+9 -1) </details> ### 📄 Description Related issues: #14, #17, #18 (restoring old upstream PR 9792, author restoration for draft PR #70). ### What and why Restores original pull request **OLD-9792** authored by @abnalstlll-byte: - Enforces strict section size clamping in \ ools/find_hash_lookup.py\ to prevent out-of-bounds slicing on truncated PE sections. - Validates \--window\ and \--top\ parameters against non-positive integers, returning clear command-line error messages. - Comprehensive unit test coverage in \ ests/test_find_hash_lookup.py\ (12/12 PASS). ### Tested - Windows 11 x64, Python 3.14 / 3.12: - \python -I tests/test_find_hash_lookup.py\: 12/12 PASS. - \python -I scripts/check_no_game_data.py\ on changed files: PASS. - Clean merge against \ubi/main\ (0 conflicts). ### Checklist - [x] No proprietary payloads, game-derived files, keys, or protection workarounds. - [x] Standard library only (\python -I\). - [x] Preserves author attribution and original PR commit provenance. --- <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#736
No description provided.