Skip to content

Commit

Permalink
Add crash case: "Invalid read of size 4" in printOperand(…)
Browse files Browse the repository at this point in the history
  • Loading branch information
practicalswift committed Nov 17, 2015
1 parent 156b45e commit d3a0143
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions suite/regress/invalid_read_in_print_operand.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#include <capstone.h>

#define BINARY "\x3b\x30\x62\x93\x5d\x61\x03\xe8"

int main(int argc, char **argv, char **envp) {
csh handle;
if (cs_open(CS_ARCH_X86, CS_MODE_64, &handle)) {
printf("cs_open(…) failed\n");
return 1;
}
cs_insn *insn;
cs_disasm(handle, (uint8_t *)BINARY, sizeof(BINARY) - 1, 0x1000, 0, &insn);
return 0;
}

0 comments on commit d3a0143

Please sign in to comment.