Commit Diff


commit - aac05c40926da9a9742e4eaaa1b02ea77539e223
commit + e80159c932a9f8728a7e8adf6a79282dec98a61d
blob - 88383bb4bac720ca8a1132ea7dce5e3bc2642ec2
blob + 627744d0bc7188c1c2cdac562fc5070b847518ab
--- src/cmd/auth/secstore/aescbc.c
+++ src/cmd/auth/secstore/aescbc.c
@@ -1,8 +1,9 @@
-/* encrypt file by writing
+/*
+encrypt file by writing
 	v2hdr,
 	16byte initialization vector,
 	AES-CBC(key, random | file),
-    HMAC_SHA1(md5(key), AES-CBC(random | file))
+HMAC_SHA1(md5(key), AES-CBC(random | file))
 */
 #include <u.h>
 #include <libc.h>
@@ -91,6 +92,8 @@ main(int argc, char **argv)
 			buf[--n] = 0;
 	}else{
 		pass = readcons("aescbc password", nil, 1);
+		if(pass == nil)
+			exits("readcons");
 		n = strlen(pass);
 		if(n >= BUF)
 			exits("key too long");