mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 10:19:23 +02:00
Check for null pointer when looking up endianess
This commit is contained in:
parent
74528b49ec
commit
97acbb7208
1 changed files with 4 additions and 2 deletions
|
@ -1997,8 +1997,10 @@ void PrintC::pushPartialSymbol(const Symbol *sym,int4 off,int4 sz,
|
|||
}
|
||||
else if (inslot >= 0) {
|
||||
Datatype *outtype = vn->getHigh()->getType();
|
||||
if (castStrategy->isSubpieceCastEndian(outtype,ct,off,
|
||||
sym->getFirstWholeMap()->getAddr().getSpace()->isBigEndian())) {
|
||||
AddrSpace *spc = sym->getFirstWholeMap()->getAddr().getSpace();
|
||||
if (spc == (AddrSpace *)0)
|
||||
spc = vn->getSpace();
|
||||
if (castStrategy->isSubpieceCastEndian(outtype,ct,off,spc->isBigEndian())) {
|
||||
// Treat truncation as SUBPIECE style cast
|
||||
finalcast = outtype;
|
||||
ct = (Datatype*)0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue