mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-01-10 06:27:59 -05:00
GP-702: Fixed an exception that occurred when importing Mach-O files
that define zero LC_BUILD_VERSION tool entries
This commit is contained in:
@@ -80,8 +80,10 @@ public class BuildVersionCommand extends LoadCommand {
|
||||
struct.add(DWORD, "minos", null);
|
||||
struct.add(DWORD, "sdk", null);
|
||||
struct.add(DWORD, "ntools", null);
|
||||
struct.add(new ArrayDataType(buildToolVersionDataType, ntools,
|
||||
buildToolVersionDataType.getLength()), "build_tool_version[]", null);
|
||||
if (ntools > 0) {
|
||||
struct.add(new ArrayDataType(buildToolVersionDataType, ntools,
|
||||
buildToolVersionDataType.getLength()), "build_tool_version[]", null);
|
||||
}
|
||||
struct.setCategoryPath(new CategoryPath(MachConstants.DATA_TYPE_CATEGORY));
|
||||
return struct;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user