diff src/blowfish.c @ 2251:646d34788036 vim73

Fix a few compiler warnings. Fix crash with encrypted undo file.
author Bram Moolenaar <bram@vim.org>
date Sun, 06 Jun 2010 14:20:26 +0200
parents 4e0124f5aee2
children b7cb69ab616d
line wrap: on
line diff
--- a/src/blowfish.c
+++ b/src/blowfish.c
@@ -413,6 +413,11 @@ bf_key_init(password)
 
     key = sha256_key(password);
     keylen = (int)STRLEN(key);
+    if (keylen == 0)
+    {
+	EMSG(_("E831: bf_key_init() called with empty password"));
+	return;
+    }
     for (i = 0; i < 256; ++i)
     {
 	sbx[0][i] = sbi[0][i];