Precision check in RuleSubZext

This commit is contained in:
caheckman 2022-12-22 19:00:12 -05:00
parent 2345c1289b
commit 04431f0ad2

View file

@ -4643,6 +4643,8 @@ int4 RuleSubZext::applyOp(PcodeOp *op,Funcdata &data)
basevn = subop->getIn(0);
if (basevn->isFree()) return 0;
if (basevn->getSize() != op->getOut()->getSize()) return 0; // Truncating then extending to same size
if (basevn->getSize() > sizeof(uintb))
return 0;
if (subop->getIn(1)->getOffset() != 0) { // If truncating from middle
if (subvn->loneDescend() != op) return 0; // and there is no other use of the truncated value
Varnode *newvn = data.newUnique(basevn->getSize(),(Datatype *)0);