Skip to content
This repository has been archived by the owner on Jul 10, 2023. It is now read-only.

Commit

Permalink
Fix crash when a null library name is provided
Browse files Browse the repository at this point in the history
Exports in null "library" are now placed in the EXTERNAL namespace as they should
Crash manifests when loading an ELF that imports from a library with unknown module/file name
  • Loading branch information
CreepNT committed May 22, 2022
1 parent d052d2d commit 91fd5c4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/java/vita/misc/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,9 @@ public static void prepareMonitorProgressBar(TaskMonitor monitor, String msg, lo
}

public static ExternalLocation addExternalFunction(String libraryName, String extLabel) throws InvalidInputException, DuplicateNameException {
if (libraryName == null) { //Create in "EXTERNAL" pseudolibrary
return utilsCtx.program.getExternalManager().addExtFunction((Namespace)null, extLabel, null, SourceType.ANALYSIS);
}
return utilsCtx.program.getExternalManager().addExtFunction(libraryName, extLabel, null, SourceType.ANALYSIS);
}

Expand Down

0 comments on commit 91fd5c4

Please sign in to comment.