mirror of
https://github.com/capstone-engine/capstone.git
synced 2024-12-02 18:47:30 +00:00
x86: fix operand size of farjmp/farcall. bug reported by Ruslan Kabatsayev
This commit is contained in:
parent
6482ca156a
commit
1c6309cdb8
@ -67,13 +67,22 @@ static void printopaquemem(MCInst *MI, unsigned OpNo, SStream *O)
|
||||
|
||||
switch(MI->csh->mode) {
|
||||
case CS_MODE_16:
|
||||
MI->x86opsize = 2;
|
||||
if (MI->flat_insn->id == X86_INS_LJMP || MI->flat_insn->id == X86_INS_LCALL)
|
||||
MI->x86opsize = 4;
|
||||
else
|
||||
MI->x86opsize = 2;
|
||||
break;
|
||||
case CS_MODE_32:
|
||||
MI->x86opsize = 4;
|
||||
if (MI->flat_insn->id == X86_INS_LJMP || MI->flat_insn->id == X86_INS_LCALL)
|
||||
MI->x86opsize = 6;
|
||||
else
|
||||
MI->x86opsize = 4;
|
||||
break;
|
||||
case CS_MODE_64:
|
||||
MI->x86opsize = 8;
|
||||
if (MI->flat_insn->id == X86_INS_LJMP || MI->flat_insn->id == X86_INS_LCALL)
|
||||
MI->x86opsize = 10;
|
||||
else
|
||||
MI->x86opsize = 8;
|
||||
break;
|
||||
default: // never reach
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user