Skip to content

Ghidra is a software reverse engineering (SRE) framework

GP-5515: Follow-on commit to address bug (all PE's being id's as Rust)

Ryan Kurtz24f46bb22c65
diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/PeLoader.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/PeLoader.java
index db20ad09ec..658f845b3d 100644
--- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/PeLoader.java
+++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/PeLoader.java
@@ -978,18 +978,20 @@ public class PeLoader extends AbstractPeDebugLoader {
try {
if (program != null && RustUtilities.isRust(program,
program.getMemory().getBlock(".rdata"), monitor)) {
- int extensionCount = RustUtilities.addExtensions(program, monitor,
- RustConstants.RUST_EXTENSIONS_WINDOWS);
- log.appendMsg("Installed " + extensionCount + " Rust cspec extensions");
+ try {
+ int extensionCount = RustUtilities.addExtensions(program, monitor,
+ RustConstants.RUST_EXTENSIONS_WINDOWS);
+ log.appendMsg("Installed " + extensionCount + " Rust cspec extensions");
+ }
+ catch (IOException e) {
+ log.appendMsg("Rust error: " + e.getMessage());
+ }
+ return CompilerEnum.Rustc;
}
- return CompilerEnum.Rustc;
}
catch (CancelledException e) {
// Move on
}
- catch (IOException e) {
- log.appendMsg("Rust error: " + e.getMessage());
- }
// Check for Swift
List<String> sectionNames =