mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-03 09:49:23 +02:00
Merge remote-tracking branch 'origin/GP-5625_ghidra007_AddNullChecks'
into patch (Closes #8045)
This commit is contained in:
commit
02221f03f5
2 changed files with 14 additions and 1 deletions
|
@ -3437,7 +3437,9 @@ public class RTTIGccClassRecoverer extends RTTIClassRecoverer {
|
|||
|
||||
Function calledFunction =
|
||||
extendedFlatAPI.getReferencedFunction(instruction.getMinAddress(), false);
|
||||
if (calledFunction.getName().equals(expectedCalledFunctionName)) {
|
||||
|
||||
if (calledFunction != null &&
|
||||
calledFunction.getName().equals(expectedCalledFunctionName)) {
|
||||
return instruction.getAddress();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -434,6 +434,10 @@ public class RecoveredClassHelper {
|
|||
Function calledFunction = extendedFlatAPI
|
||||
.getReferencedFunction(instruction.getMinAddress(), getThunkedFunction);
|
||||
|
||||
if (calledFunction == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// include the null functions in map so things using map can get accurate count
|
||||
// of number of CALL instructions even if the call reg type
|
||||
functionCallMap.put(instruction.getMinAddress(), calledFunction);
|
||||
|
@ -2112,6 +2116,10 @@ public class RecoveredClassHelper {
|
|||
Function constructor =
|
||||
extendedFlatAPI.getReferencedFunction(constructorReference, true);
|
||||
|
||||
if (constructor == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (recoveredClass.getIndeterminateList().contains(constructor)) {
|
||||
addConstructorToClass(recoveredClass, constructor);
|
||||
recoveredClass.removeIndeterminateConstructorOrDestructor(constructor);
|
||||
|
@ -2534,6 +2542,9 @@ public class RecoveredClassHelper {
|
|||
RecoveredClass recoveredClass = referenceToClassMap.get(destructorReference);
|
||||
|
||||
Function destructor = extendedFlatAPI.getReferencedFunction(destructorReference, true);
|
||||
if (destructor == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (recoveredClass.getIndeterminateList().contains(destructor)) {
|
||||
addDestructorToClass(recoveredClass, destructor);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue