diff --git a/lib/blockstore/file.js b/lib/blockstore/file.js index b4ec86204..027333363 100644 --- a/lib/blockstore/file.js +++ b/lib/blockstore/file.js @@ -482,7 +482,7 @@ class FileBlockStore extends AbstractBlockStore { if (offset + length > blockrecord.length) throw new Error('Out-of-bounds read.'); - const data = Buffer.allocUnsafe(length); + const data = Buffer.alloc(length); const fd = await fs.open(filepath, 'r'); let bytes = 0;