From ddd7f893e9f4afa43f4cc1dab996264244fd3885 Mon Sep 17 00:00:00 2001 From: Randall Winkhart Date: Tue, 10 Feb 2026 21:54:34 -0500 Subject: [PATCH] Fix password being zeroized in RunSanityCheck() --- wrappers/sanityCheck.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wrappers/sanityCheck.go b/wrappers/sanityCheck.go index af45781..ca56678 100644 --- a/wrappers/sanityCheck.go +++ b/wrappers/sanityCheck.go @@ -25,7 +25,9 @@ func RunSanityCheck(path string, password []byte) error { if err != nil { return errors.New("Failed to read sanity check file (" + path + ")") } - decBytes, err := DecryptAndZeroizePassword(encBytes, password) + + // avoid zeroizing password, as this function expects the user to use the password after running it + decBytes, err := DecryptAndZeroizePassword(encBytes, append([]byte{}, password...)) if err == nil { if bytes.Equal(decBytes, []byte("thx4usin'rcw")) { return nil