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

Open
github-bot wants to merge 1 commit from github-bot/gh-696 into main AGit
Owner

@⁠abnalstlll-byte on GitHub · 2026-11-24 12:17 UTC · original
abnalstlll-byte:feat/find-hash-lookup-bounds → main · +86 −1 · 2 files · 1 commits · open

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.
**@⁠abnalstlll-byte** on GitHub · 2026-11-24 12:17 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/696) `abnalstlll-byte:feat/find-hash-lookup-bounds` → `main` · +86 −1 · 2 files · 1 commits · open 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.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:16:51 +00:00
Author
Owner

@⁠abnalstlll-byte on GitHub · 2026-11-25 21:34 UTC · original

Rebased cleanly onto latest \main\ (\e34ff17e9), clearing stale base CI failures. Verified: all 12 tests in \ est_find_hash_lookup.py\ pass.

AI-assisted (Claude Code)

**@⁠abnalstlll-byte** on GitHub · 2026-11-25 21:34 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/696#issuecomment-7175265932) Rebased cleanly onto latest \main\ (\e34ff17e9\), clearing stale base CI failures. Verified: all 12 tests in \ est_find_hash_lookup.py\ pass. AI-assisted (Claude Code)
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/696/head:github-bot/gh-696'
git switch 'github-bot/gh-696'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-696'
git switch 'github-bot/gh-696'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-696'
git switch 'github-bot/gh-696'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-696'
git switch 'main'
git merge --squash 'github-bot/gh-696'
git switch 'main'
git merge --ff-only 'github-bot/gh-696'
git switch 'main'
git merge 'github-bot/gh-696'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.