GP-1796 NULL ptr accesses on rare paths

This commit is contained in:
caheckman 2022-03-04 13:29:49 -05:00
parent 1996cdacd1
commit 45eeb7cfb2
6 changed files with 29 additions and 14 deletions

View file

@ -350,10 +350,7 @@ void PcodeCompile::newLocalDefinition(string *varname,uint4 size)
{ // Create a new temporary symbol (without generating any pcode)
VarnodeSymbol *sym;
VarnodeTpl *tmpvn = buildTemporary();
if (size != 0)
tmpvn->setSize(ConstTpl(ConstTpl::real,size)); // Size was explicitly specified
sym = new VarnodeSymbol(*varname,tmpvn->getSpace().getSpace(),tmpvn->getOffset().getReal(),tmpvn->getSize().getReal());
sym = new VarnodeSymbol(*varname,uniqspace,allocateTemp(),size);
addSymbol(sym);
delete varname;
}