From 06eacaf4c82e93fd6449829fcd6f8955c9e996b4 Mon Sep 17 00:00:00 2001 From: Nguyen Anh Quynh Date: Tue, 16 Jun 2015 14:03:07 +0800 Subject: [PATCH] ppc: return failure when Base>=32 in decodeMemRIOperands() --- arch/PowerPC/PPCDisassembler.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/PowerPC/PPCDisassembler.c b/arch/PowerPC/PPCDisassembler.c index f7dc48ba07..21058a606e 100644 --- a/arch/PowerPC/PPCDisassembler.c +++ b/arch/PowerPC/PPCDisassembler.c @@ -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;