mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-06-01 14:28:22 +08:00
GP-3505: Fixed an AddressOutOfBoundsException that could sometimes occur
when importing the exports section of dyld_shared_cache files (Closes #5392)
This commit is contained in:
@@ -511,11 +511,14 @@ public class MachoProgramBuilder {
|
||||
Address baseAddr = space.getAddress(textSegment.getVMaddress());
|
||||
for (ExportEntry export : exports) {
|
||||
String name = SymbolUtilities.replaceInvalidChars(export.getName(), true);
|
||||
Address exportAddr = baseAddr.add(export.getAddress());
|
||||
program.getSymbolTable().addExternalEntryPoint(exportAddr);
|
||||
try {
|
||||
Address exportAddr = baseAddr.add(export.getAddress());
|
||||
program.getSymbolTable().addExternalEntryPoint(exportAddr);
|
||||
program.getSymbolTable().createLabel(exportAddr, name, SourceType.IMPORTED);
|
||||
}
|
||||
catch (AddressOutOfBoundsException e) {
|
||||
log.appendMsg("Failed to process export '" + export + "': " + e.getMessage());
|
||||
}
|
||||
catch (Exception e) {
|
||||
log.appendMsg("Unable to create symbol: " + e.getMessage());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user