mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 18:29:37 +02:00
Corrected NPE in decompiler.
Reference overrides must ignore external references.
This commit is contained in:
parent
e6cbefc706
commit
2d144fb457
2 changed files with 4 additions and 2 deletions
|
@ -343,8 +343,10 @@ public class DecompilerUtils {
|
|||
if (token instanceof ClangFuncNameToken) {
|
||||
// special case: we know that name tokens do not have addresses
|
||||
Function function = getFunction(program, (ClangFuncNameToken) token);
|
||||
if (function != null) {
|
||||
return function.getEntryPoint();
|
||||
}
|
||||
}
|
||||
|
||||
Address address = token.getMinAddress();
|
||||
if (address != null) {
|
||||
|
|
|
@ -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…
Add table
Add a link
Reference in a new issue