git: 9front

Download patch

ref: 4a269a806bb86359f10385ac58c8e10cecd0a0b3
parent: 7dd8fa45de3fb34be537645d046d2304dfc8205f
author: Sigrid Solveig Haflínudóttir <ftrvxmtrx@gmail.com>
date: Thu Nov 25 16:42:12 EST 2021

aescbc: flush before exit and report an error (if any)

--- a/sys/src/cmd/auth/secstore/aescbc.c
+++ b/sys/src/cmd/auth/secstore/aescbc.c
@@ -146,6 +146,8 @@
 				sysfatal("decrypted file failed to authenticate");
 		}
 	}
-	exits("");
+	if(Bflush(&bout) != 0)
+		sysfatal("write: %r");
+	exits(nil);
 	return 1;  /* keep  other compilers happy */
 }
--