Ghidra is a software reverse engineering (SRE) framework
GP-5825: Fixing regression with loading libraries from container file
Ryan Kurtzb5bfcc0fbf0f
diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/AbstractLibrarySupportLoader.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/AbstractLibrarySupportLoader.javaindex 6bc3daf4ff..1fb58c3774 100644--- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/AbstractLibrarySupportLoader.java+++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/AbstractLibrarySupportLoader.java@@ -1121,14 +1121,29 @@ public abstract class AbstractLibrarySupportLoader extends AbstractProgramLoadercontinue;}- try (RefdFile fileRef = fsService.getRefdFile(fsrl, monitor)) {- if (fileRef != null) {- result.add(- new LibrarySearchPath(fileRef.fsRef.dup(), fileRef.file.getPath()));+ if (fsService.isLocal(fsrl)) {+ try {+ // It might be a container file that we want to look inside of, so probe+ FileSystemRef fileRef =+ fsService.probeFileForFilesystem(fsrl, monitor, null);+ if (fileRef != null) {+ result.add(new LibrarySearchPath(fileRef, null));+ }+ }+ catch (IOException e) {+ log.appendMsg(e.getMessage());}}- catch (IOException e) {- log.appendMsg(e.getMessage());+ else {+ try (RefdFile fileRef = fsService.getRefdFile(fsrl, monitor)) {+ if (fileRef != null) {+ result.add(+ new LibrarySearchPath(fileRef.fsRef.dup(), fileRef.file.getPath()));+ }+ }+ catch (IOException e) {+ log.appendMsg(e.getMessage());+ }}}success = true;