Skip to content

Ghidra is a software reverse engineering (SRE) framework

9303: Varnode.High NP gate in ForceUnionAction.findUnion

Paul Galbraithbf1f42fc4302
diff --git a/Ghidra/Features/Decompiler/src/main/java/ghidra/app/plugin/core/decompile/actions/ForceUnionAction.java b/Ghidra/Features/Decompiler/src/main/java/ghidra/app/plugin/core/decompile/actions/ForceUnionAction.java
index 022edfad8b..fd81141ce0 100644
--- a/Ghidra/Features/Decompiler/src/main/java/ghidra/app/plugin/core/decompile/actions/ForceUnionAction.java
+++ b/Ghidra/Features/Decompiler/src/main/java/ghidra/app/plugin/core/decompile/actions/ForceUnionAction.java
@@ -68,7 +68,7 @@ public class ForceUnionAction extends AbstractDecompilerAction {
}
}
Varnode vn = tokenAtCursor.getVarnode();
- if (vn != null) {
+ if (vn != null && vn.getHigh() != null) {
DataType dt = vn.getHigh().getDataType();
if (dt instanceof TypeDef) {
dt = ((TypeDef) dt).getBaseDataType();