mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 10:49:34 +02:00
GP-1796 NULL ptr accesses on rare paths
This commit is contained in:
parent
1996cdacd1
commit
45eeb7cfb2
6 changed files with 29 additions and 14 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue