mirror of
https://github.com/capstone-engine/capstone
synced 2026-08-11 16:26:07 -04:00
Prevent calling backend decoder with no remaining bytes, which could lead to out-of-bounds reads. Co-authored-by: Petar Andrić <slate@null.net>
This commit is contained in:
parent
30d610cd65
commit
2de76ae94d
1 changed files with 3 additions and 0 deletions
3
cs.c
3
cs.c
|
|
@ -1114,6 +1114,9 @@ CAPSTONE_EXPORT
|
|||
bool CAPSTONE_API cs_disasm_iter(csh ud, const uint8_t **code, size_t *size,
|
||||
uint64_t *address, cs_insn *insn)
|
||||
{
|
||||
if (*size == 0)
|
||||
return false;
|
||||
|
||||
struct cs_struct *handle;
|
||||
uint16_t insn_size;
|
||||
MCInst mci;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue