sparc: initialize detail->sparc in Sparc_getInstruction. bug reported by Ben Nagy

This commit is contained in:
Nguyen Anh Quynh 2014-07-09 13:07:45 +08:00
parent 39d6b2f066
commit e1fc8a83ba

View File

@ -232,7 +232,7 @@ bool Sparc_getInstruction(csh ud, const uint8_t *code, size_t code_len, MCInst *
return MCDisassembler_Fail;
if (MI->flat_insn->detail) {
memset(&MI->flat_insn->detail->sparc, 0, offsetof(cs_sparc, operands));
memset(&MI->flat_insn->detail->sparc, 0, sizeof(cs_sparc));
}
Result = decodeInstruction_4(DecoderTableSparc32, MI, Insn, address,