20 lines
551 B
Diff
20 lines
551 B
Diff
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));
|