Skip to content

Commit

Permalink
ppc: return failure when Base>=32 in decodeMemRIOperands()
Browse files Browse the repository at this point in the history
  • Loading branch information
aquynh committed Jun 16, 2015
1 parent d49ec46 commit 06eacaf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/PowerPC/PPCDisassembler.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,8 @@ static DecodeStatus decodeMemRIOperands(MCInst *Inst, uint64_t Imm,
uint64_t Disp = Imm & 0xFFFF;

// assert(Base < 32 && "Invalid base register");
if (Base >= 32)
return MCDisassembler_Fail;

switch (MCInst_getOpcode(Inst)) {
default: break;
Expand Down

0 comments on commit 06eacaf

Please sign in to comment.