GT-3252: Fixing infinite loop in MemoryBlockDB.putBytes (fixes #1149).

This commit is contained in:
Ryan Kurtz 2019-10-23 11:27:57 -04:00
parent eb97637333
commit 083b5f61cc

View File

@ -477,7 +477,7 @@ public class MemoryBlockDB implements MemoryBlock {
int totalCopied = 0;
try {
while (totalCopied < len) {
SubMemoryBlock subBlock = getSubBlock(offset);
SubMemoryBlock subBlock = getSubBlock(offset + totalCopied);
totalCopied += subBlock.putBytes(offset + totalCopied, b, off + totalCopied,
len - totalCopied);
}