File hashalot-ctrl-d.diff of Package cryptsetup

exit unsucessfully on empty passphrase

Signed-off-by: Ludwig Nussel <ludwig.nussel@suse.de>

Index: hashalot-0.3/hashalot.c
===================================================================
--- hashalot-0.3/hashalot.c.orig
+++ hashalot-0.3/hashalot.c
@@ -275,6 +275,10 @@ main(int argc, char *argv[]) 
 
 	/* here we acquire the precious passphrase... */
 	pass = xgetpass("Enter passphrase: ");
+	if(!*pass) {
+		exit(EXIT_FAILURE);
+	}
+
 	if (salt)
 		pass = salt_passphrase(pass, salt);
 	hashlen = func(passhash, hashlen, pass, strlen(pass));
openSUSE Build Service is sponsored by