From a0a7f430e426829213bdba8516fcc4dd39977d4a Mon Sep 17 00:00:00 2001 From: Evan Su <48808396+HACKERALERT@users.noreply.github.com> Date: Fri, 18 Apr 2025 15:04:28 -0400 Subject: [PATCH] missing an err != nil check --- src/Picocrypt.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Picocrypt.go b/src/Picocrypt.go index a4caeef..5d66c39 100644 --- a/src/Picocrypt.go +++ b/src/Picocrypt.go @@ -605,7 +605,7 @@ func draw() { panic(errors.New("fatal crypto/rand error")) } n, err := fout.Write(data) - if n != 32 { + if err != nil || n != 32 { fout.Close() panic(errors.New("failed to write full keyfile")) }