mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-10-01 17:11:44 -09:00
GP-3912: Fixing a Mach-O load exception that could happen if a binary
referred to itself as a dependent library (Closes #5937)
This commit is contained in:
@@ -1196,10 +1196,10 @@ public class MachoProgramBuilder {
|
||||
}
|
||||
|
||||
if (libraryPath != null) {
|
||||
libraryPaths.add(libraryPath);
|
||||
int index = libraryPath.lastIndexOf("/");
|
||||
String libraryName = index != -1 ? libraryPath.substring(index + 1) : libraryPath;
|
||||
if (!libraryName.equals(program.getName())) {
|
||||
libraryPaths.add(libraryPath);
|
||||
addLibrary(libraryPath);
|
||||
props.setString(
|
||||
ExternalSymbolResolver.getRequiredLibraryProperty(libraryIndex++),
|
||||
|
||||
Reference in New Issue
Block a user