mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 10:49:34 +02:00
Refixed relative objc methods issue in #3611.
Added null check for ObjectiveC2_class.
This commit is contained in:
parent
7a45cf24f1
commit
116b12badb
2 changed files with 8 additions and 4 deletions
|
@ -52,7 +52,7 @@ public class ObjectiveC2_Class implements StructConverter {
|
|||
AddressSpace space = _state.program.getAddressFactory().getDefaultAddressSpace();
|
||||
Address addr = space.getAddress(_index);
|
||||
Symbol symbol = _state.program.getSymbolTable().getPrimarySymbol(addr);
|
||||
if (symbol.getParentNamespace().getName().equals(SectionNames.SECT_GOT)) {
|
||||
if (symbol != null && symbol.getParentNamespace().getName().equals(SectionNames.SECT_GOT)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -37,9 +37,13 @@ public class ObjectiveC2_Method extends ObjectiveC_Method {
|
|||
|
||||
if (isSmallList) {
|
||||
int nameOffset = (int)ObjectiveC1_Utilities.readNextIndex(reader, true);
|
||||
int namePtr = reader.readInt(_index + nameOffset);
|
||||
long imagebase = state.program.getImageBase().getOffset(); // When we support dyld_shared_cache, this base will likely have to change
|
||||
name = reader.readAsciiString(imagebase + namePtr);
|
||||
long namePtr;
|
||||
if (state.is32bit)
|
||||
namePtr = reader.readInt(_index + nameOffset);
|
||||
else
|
||||
namePtr = reader.readLong(_index + nameOffset);
|
||||
|
||||
name = reader.readAsciiString(namePtr);
|
||||
|
||||
int typesOffset = (int)ObjectiveC1_Utilities.readNextIndex(reader, true);
|
||||
types = reader.readAsciiString(_index + 4 + typesOffset);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue