shithub: plan9front

Download patch

ref: add3a0a4da2f46f69a87782699e77c794a8b2cb9
parent: e2a8d3493ab0fdc345b6513a53f30f2b4f36ed97
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	Sun Nov 21 18:42:13 2021
+++ b/sys/src/cmd/auth/secstore/aescbc.c	Thu Nov 25 16:42:12 2021
@@ -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 */
 }