Skip to content

Fix H8/300 decoder reads past truncated 4-byte opcodes - #6887

Draft
b1llow wants to merge 1 commit into
devfrom
b1llow/fix-h8300-decode-oob-be46
Draft

b1llow wants to merge 1 commit into
devfrom
b1llow/fix-h8300-decode-oob-be46

Conversation

@b1llow

@b1llow b1llow commented Oct 14, 2026

Copy link
Copy Markdown
Member

Your checklist for this pull request

  • I've read the guidelines for contributing to this repository.
  • I made sure to follow the project's coding style.
  • I've documented every RZ_API function and struct this PR changes.
  • I've added tests that prove my changes are effective (required for changes to RZ_API).
  • I've updated the Rizin book with the relevant information (if needed).
  • I've used AI tools to generate fully or partially these code changes and I'm sure the changes are not copyrighted by somebody else.

Detailed description

...

Test plan

...

Closing issues

closes #6844

Decode four-byte JSR, JMP, MOV.B, and MOV.W forms only from
h8300_decode_4(), after checking that at least four bytes are available.
Preserve valid two-byte instruction decoding and the existing failure path.

Cover 27 valid and 30 truncated input scenarios across h8300, h8300h,
and h8300l in the analysis database. Add seven H8300H disassembly cases
with complete validated RzIL snapshots, reusing existing base CPU cases.
Keep the five generic analysis API unit tests unchanged.

Co-authored-by agent: cursor/grok-4.7
Co-authored-by agent: omp/openai-codex/gpt-6-astra
@github-actions github-actions Bot added rz-test RzAnalysis RzAsm-Disassembler H8300 AI/LLM Partially or fully AI generated. Critical thinking is advised! labels Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI/LLM Partially or fully AI generated. Critical thinking is advised! H8300 rz-test RzAnalysis RzAsm-Disassembler

Projects

None yet

Development

Successfully merging this pull request may close these issues.

h8300: h8300_decode_2() dispatches to 4-byte jsr decoder after checking only len >= 2

1 participant