mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-09-28 17:11:11 -09:00
GP-3926: Tweaking how the MachoLoader handles binaries with obfuscated
segment and section names (#3876)
This commit is contained in:
@@ -403,7 +403,9 @@ public class MachHeader implements StructConverter {
|
||||
List<Section> sections = segment.getSections();
|
||||
for (int j = 0; j < sections.size(); j++) {
|
||||
Section section = sections.get(j);
|
||||
section.setSegmentName(segment.getSegmentName());
|
||||
if (invalid.apply(section.getSegmentName())) {
|
||||
section.setSegmentName("__INVALID.%d".formatted(i));
|
||||
}
|
||||
if (invalid.apply(section.getSectionName())) {
|
||||
section.setSectionName("__invalid.%d".formatted(j));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user