x86.operands array wasn't fully cleared

This commit is contained in:
obs 2014-08-17 21:46:30 +02:00
parent aa791a2f48
commit b7e2ff451f

View File

@ -715,7 +715,7 @@ bool X86_getInstruction(csh ud, const uint8_t *code, size_t code_len,
if (instr->flat_insn->detail) {
instr->flat_insn->detail->x86.op_count = 0;
memset(instr->flat_insn->detail->x86.prefix, 0, sizeof(instr->flat_insn->detail->x86.prefix));
memset(instr->flat_insn->detail->x86.operands, 0, 4 * sizeof(instr->flat_insn->detail->x86.operands[0]));
memset(instr->flat_insn->detail->x86.operands, 0, ARR_SIZE(instr->flat_insn->detail->x86.operands));
}
if (handle->mode & CS_MODE_16)