From 9e9083a074f77eeae9dbb7e66bfdf0b09832d182 Mon Sep 17 00:00:00 2001 From: ghidra1 Date: Wed, 10 Jun 2026 17:49:23 -0400 Subject: [PATCH] GP-6953 Corrected GUID datatype alignment to be 4-bytes --- .../app/util/datatype/microsoft/GuidDataType.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/datatype/microsoft/GuidDataType.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/datatype/microsoft/GuidDataType.java index 4d42d00c39..60cf14ba74 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/datatype/microsoft/GuidDataType.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/datatype/microsoft/GuidDataType.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -50,6 +50,7 @@ public class GuidDataType extends BuiltIn { private static SettingsDefinition[] SETTINGS_DEFS = { ENDIAN }; public static final int SIZE = 16; + public static final int ALIGNMENT = 4; public static final String KEY = "GUID_NAME"; private static String cachedGuidString; @@ -76,9 +77,14 @@ public class GuidDataType extends BuiltIn { return SIZE; } + @Override + public int getAlignment() { + return ALIGNMENT; + } + @Override public String getDescription() { - return NAME; + return "16-byte Global Unique Identifier (GUID)"; } @Override