Skip to content

Conversation

@zydeco
Copy link
Contributor

@zydeco zydeco commented Nov 15, 2020

When setting up skipdata with the mnemonic as NULL, capstone will crash during disassembly here when trying to strcpy a null pointer:
https://github.com/aquynh/capstone/blob/c93fa3a79614a0de48dcb0b9dd98156bd6326bee/cs.c#L945-L946

This can be verified by changing cs_opt_skipdata in test_skipdata.c.

This fix will use the SKIPDATA_MNEM constant when NULL is passed, so it will work according to the documentation:
https://github.com/aquynh/capstone/blob/c93fa3a79614a0de48dcb0b9dd98156bd6326bee/include/capstone/capstone.h#L255-L260

@pranith
Copy link
Contributor

pranith commented Mar 4, 2021

Can you please create a new PR on libcapstone?

@aquynh aquynh merged commit 27ac4c0 into capstone-engine:next Mar 19, 2021
@aquynh
Copy link
Collaborator

aquynh commented Mar 19, 2021

merged, thanks!

@riptl riptl mentioned this pull request Jul 22, 2022
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants