Skip to content

Commit

Permalink
NIDAnalyzer: check that import thunk exists before renaming
Browse files Browse the repository at this point in the history
Make sure the import thunk exists before attempting to rename it; otherwise, the analyzer will fail.
?Workaround for another bug?
  • Loading branch information
CreepNT authored Aug 25, 2024
1 parent fbbc814 commit bbec4dc
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/main/java/vitaloaderredux/analyzer/NIDAnalyzer.java
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,13 @@ private void analyzeFunction(IEType importOrExport, String libraryName, Address
func.setName(databaseName, SourceType.ANALYSIS);
if (importOrExport == IEType.IMPORT) {
//Set name for the thunk too
func.getThunkedFunction(true).setName(databaseName, SourceType.ANALYSIS);
Function thunk = func.getThunkedFunction(true);
if (thunk == null) {
helper.logf("Import thunk for %s_%08X (%s) not found (bug?)",
libraryName, functionNID, databaseName);
} else {
thunk.setName(databaseName, SourceType.ANALYSIS);
}
}

helper.symTbl.createLabel(funcAddr, oldName, SourceType.ANALYSIS);
Expand Down

0 comments on commit bbec4dc

Please sign in to comment.