From c5cef9540e14023e248dcb8e8c8d0e4f569782b5 Mon Sep 17 00:00:00 2001 From: Dan <46821332+nsadeveloper789@users.noreply.github.com> Date: Thu, 12 Sep 2024 13:52:56 -0400 Subject: [PATCH] GP-2032: UndefData.getBytes fills one 0 without memspace. --- .../database/program/AbstractDBTraceProgramViewListing.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Ghidra/Debug/Framework-TraceModeling/src/main/java/ghidra/trace/database/program/AbstractDBTraceProgramViewListing.java b/Ghidra/Debug/Framework-TraceModeling/src/main/java/ghidra/trace/database/program/AbstractDBTraceProgramViewListing.java index 5b442f13b3..15b075dd80 100644 --- a/Ghidra/Debug/Framework-TraceModeling/src/main/java/ghidra/trace/database/program/AbstractDBTraceProgramViewListing.java +++ b/Ghidra/Debug/Framework-TraceModeling/src/main/java/ghidra/trace/database/program/AbstractDBTraceProgramViewListing.java @@ -65,8 +65,8 @@ public abstract class AbstractDBTraceProgramViewListing implements TraceProgramV public int getBytes(ByteBuffer buffer, int addressOffset) { DBTraceMemorySpace mem = trace.getMemoryManager().get(this, false); if (mem == null) { - // TODO: 0-fill instead? Will need to check memory space bounds. - return 0; + buffer.put((byte) 0); + return 1; } return mem.getViewBytes(program.snap, address.add(addressOffset), buffer); }