capstone-engine / capstone

Capstone disassembly/disassembler framework for ARM, ARM64 (ARMv8), Alpha, BPF, Ethereum VM, HPPA, LoongArch, M68K, M680X, Mips, MOS65XX, PPC, RISC-V(rv32G/rv64G), SH, Sparc, SystemZ, TMS320C64X, TriCore, Webassembly, XCore and X86.
http://www.capstone-engine.org
7.61k stars 1.56k forks source link

[v5] Fix unintended zero set in Sparc printInst #2420

Closed david942j closed 3 months ago

david942j commented 3 months ago

Your checklist for this pull request

Detailed description

The null byte should be set after the mnemonic string instead of overwriting the last byte of it.

...

Test plan

Updated suite/cs_test/issues.cs with a Sparc jump with condition instruction and confirmed ./build/cstest -f ./issues.cs failed without the fix.

...

Closing issues

Fixes #2419

...