From add3a0a4da2f46f69a87782699e77c794a8b2cb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sigrid=20Solveig=20Hafl=C3=ADnud=C3=B3ttir?= Date: Thu, 25 Nov 2021 21:42:12 +0000 Subject: [PATCH] aescbc: flush before exit and report an error (if any) --- sys/src/cmd/auth/secstore/aescbc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/src/cmd/auth/secstore/aescbc.c b/sys/src/cmd/auth/secstore/aescbc.c index 148339e5c..ffa8b38d1 100644 --- a/sys/src/cmd/auth/secstore/aescbc.c +++ b/sys/src/cmd/auth/secstore/aescbc.c @@ -146,6 +146,8 @@ main(int argc, char **argv) sysfatal("decrypted file failed to authenticate"); } } - exits(""); + if(Bflush(&bout) != 0) + sysfatal("write: %r"); + exits(nil); return 1; /* keep other compilers happy */ }