mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 18:29:37 +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) {
|
else if (inslot >= 0) {
|
||||||
Datatype *outtype = vn->getHigh()->getType();
|
Datatype *outtype = vn->getHigh()->getType();
|
||||||
if (castStrategy->isSubpieceCastEndian(outtype,ct,off,
|
AddrSpace *spc = sym->getFirstWholeMap()->getAddr().getSpace();
|
||||||
sym->getFirstWholeMap()->getAddr().getSpace()->isBigEndian())) {
|
if (spc == (AddrSpace *)0)
|
||||||
|
spc = vn->getSpace();
|
||||||
|
if (castStrategy->isSubpieceCastEndian(outtype,ct,off,spc->isBigEndian())) {
|
||||||
// Treat truncation as SUBPIECE style cast
|
// Treat truncation as SUBPIECE style cast
|
||||||
finalcast = outtype;
|
finalcast = outtype;
|
||||||
ct = (Datatype*)0;
|
ct = (Datatype*)0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue