Skip to content

Commit 083b5f6

Browse files
committed
GT-3252: Fixing infinite loop in MemoryBlockDB.putBytes (fixes NationalSecurityAgency#1149).
1 parent eb97637 commit 083b5f6

File tree

1 file changed

+1
-1
lines changed
  • Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/mem

1 file changed

+1
-1
lines changed

Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/mem/MemoryBlockDB.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ private int putBytes(long offset, byte[] b, int off, int len) throws MemoryAcces
477477
int totalCopied = 0;
478478
try {
479479
while (totalCopied < len) {
480-
SubMemoryBlock subBlock = getSubBlock(offset);
480+
SubMemoryBlock subBlock = getSubBlock(offset + totalCopied);
481481
totalCopied += subBlock.putBytes(offset + totalCopied, b, off + totalCopied,
482482
len - totalCopied);
483483
}

0 commit comments

Comments
 (0)