x86: LES is invalid in x64. see #904
This commit is contained in:
parent
79e1a1821e
commit
1e28d29bb9
|
@ -835,6 +835,12 @@ bool X86_getInstruction(csh ud, const uint8_t *code, size_t code_len,
|
||||||
|
|
||||||
result = (!translateInstruction(instr, &insn)) ? true : false;
|
result = (!translateInstruction(instr, &insn)) ? true : false;
|
||||||
if (result) {
|
if (result) {
|
||||||
|
// quick fix for #904. TODO: fix this properly in the next update
|
||||||
|
if (handle->mode & CS_MODE_64 &&
|
||||||
|
(instr->Opcode == X86_LES16rm || instr->Opcode == X86_LES32rm))
|
||||||
|
// LES is invalid in x64
|
||||||
|
return false;
|
||||||
|
|
||||||
instr->imm_size = insn.immSize;
|
instr->imm_size = insn.immSize;
|
||||||
if (handle->detail) {
|
if (handle->detail) {
|
||||||
update_pub_insn(instr->flat_insn, &insn, instr->x86_prefix);
|
update_pub_insn(instr->flat_insn, &insn, instr->x86_prefix);
|
||||||
|
|
Loading…
Reference in New Issue