GP-5869 Fix for some out of bounds array indices and shift amounts

This commit is contained in:
caheckman 2025-07-23 22:49:35 +00:00
parent 7426d4b685
commit 943ccd322d
17 changed files with 98 additions and 50 deletions

View file

@ -665,8 +665,9 @@ uintb PcodeOp::getNZMaskLocal(bool cliploop) const
resmask &= fullmask;
break;
case CPUI_PIECE:
sa = getIn(1)->getSize();
resmask = getIn(0)->getNZMask();
resmask <<= 8*getIn(1)->getSize();
resmask = (sa < sizeof(uintb)) ? resmask << 8*sa : 0;
resmask |= getIn(1)->getNZMask();
break;
case CPUI_INT_MULT: