mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2024-11-25 13:42:06 +00:00
Corrected NPE in decompiler.
Reference overrides must ignore external references.
This commit is contained in:
parent
e6cbefc706
commit
2d144fb457
@ -343,7 +343,9 @@ public class DecompilerUtils {
|
||||
if (token instanceof ClangFuncNameToken) {
|
||||
// special case: we know that name tokens do not have addresses
|
||||
Function function = getFunction(program, (ClangFuncNameToken) token);
|
||||
return function.getEntryPoint();
|
||||
if (function != null) {
|
||||
return function.getEntryPoint();
|
||||
}
|
||||
}
|
||||
|
||||
Address address = token.getMinAddress();
|
||||
|
@ -47,7 +47,7 @@ public class InstructionPcodeOverride implements PcodeOverride {
|
||||
|
||||
primaryOverridingReferences = new ArrayList<>();
|
||||
for (Reference ref : instr.getReferencesFrom()) {
|
||||
if (!ref.isPrimary()) {
|
||||
if (!ref.isPrimary() || !ref.getToAddress().isMemoryAddress()) {
|
||||
continue;
|
||||
}
|
||||
RefType type = ref.getReferenceType();
|
||||
|
Loading…
Reference in New Issue
Block a user