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.51k stars 1.54k forks source link

[next] Fix unintended zero set in Sparc printInst #2421

Closed david942j closed 1 month ago

david942j commented 2 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 (along with #2420)

...

Rot127 commented 1 month ago

@kabeor Can you please merge this and the other PRs?