From: Chris Duncan Date: Wed, 5 Aug 2026 06:47:11 +0000 (-0700) Subject: Fix data arg buffer zeroing. X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=fe32bceb6a6d42506a9bcc27561104d9b00d10e1;p=libnemo.git Fix data arg buffer zeroing. --- diff --git a/src/lib/vault/parsers.ts b/src/lib/vault/parsers.ts index 4b76cc4..e140e51 100644 --- a/src/lib/vault/parsers.ts +++ b/src/lib/vault/parsers.ts @@ -49,7 +49,7 @@ export function parseData (action: string, data: Record) { } seed = data.seed.slice() } - new Uint8Array(data.seed).fill(0) + new Uint8Array(data.seed ?? []).fill(0) delete data.seed // Mnemonic phrase to load @@ -80,7 +80,7 @@ export function parseData (action: string, data: Record) { } encrypted = data.encrypted.slice() } - new Uint8Array(data.encrypted).fill(0) + new Uint8Array(data.encrypted ?? []).fill(0) delete data.encrypted // Index for child account to derive or sign @@ -101,7 +101,7 @@ export function parseData (action: string, data: Record) { } message = data.message.slice() } - new Uint8Array(data.message).fill(0) + new Uint8Array(data.message ?? []).fill(0) delete data.message // Vault configuration