From: Chris Duncan Date: Mon, 10 Aug 2026 05:09:09 +0000 (-0700) Subject: Improve guard for zeroing buffer. X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=240bdcdc5060123b0087e0d7d5755af257260ec0;p=libnemo.git Improve guard for zeroing buffer. --- diff --git a/src/lib/vault/parsers.ts b/src/lib/vault/parsers.ts index 26dc60d..39cc305 100644 --- a/src/lib/vault/parsers.ts +++ b/src/lib/vault/parsers.ts @@ -77,7 +77,7 @@ export function parseData (action: string, data: Record) { } encrypted = data.encrypted.slice() } - new Uint8Array(data.encrypted as ArrayBuffer).fill(0) + if (data.encrypted instanceof ArrayBuffer) new Uint8Array(data.encrypted).fill(0) delete data.encrypted }