Ghidra is a software reverse engineering (SRE) framework
GP-6253: Emu: Fix crash reading uniques before space is written.
Danc1d61b0025ac
diff --git a/Ghidra/Framework/Emulation/src/main/java/ghidra/pcode/exec/AbstractLongOffsetPcodeExecutorStatePiece.java b/Ghidra/Framework/Emulation/src/main/java/ghidra/pcode/exec/AbstractLongOffsetPcodeExecutorStatePiece.javaindex 661e6ebd01..e02a705546 100644--- a/Ghidra/Framework/Emulation/src/main/java/ghidra/pcode/exec/AbstractLongOffsetPcodeExecutorStatePiece.java+++ b/Ghidra/Framework/Emulation/src/main/java/ghidra/pcode/exec/AbstractLongOffsetPcodeExecutorStatePiece.java@@ -127,6 +127,9 @@ public abstract class AbstractLongOffsetPcodeExecutorStatePiece<A, T, S>*/protected T getUnique(long offset, int size, Reason reason, PcodeStateCallbacks cb) {S s = getForSpace(uniqueSpace, false);+ if (s == null) {+ return getFromNullSpace(size, reason, cb);+ }return getFromSpace(s, offset, size, reason, cb);}