Missing register validation check.

This commit is contained in:
joerg 2014-05-03 23:19:56 +00:00
parent 0b6a7ee607
commit 7e3335542c
1 changed files with 2 additions and 0 deletions

View File

@ -461,6 +461,8 @@ CFI_Parser<A, R>::parseInstructions(A &addressSpace, pint_t instructions,
reg = R::dwarf2regno(addressSpace.getULEB128(p, instructionsEnd));
offset =
addressSpace.getULEB128(p, instructionsEnd) * cieInfo.dataAlignFactor;
if (reg > kMaxRegisterNumber)
return false;
results->savedRegisters[reg].location = kRegisterOffsetFromCFA;
results->savedRegisters[reg].value = offset;
break;