diff options
author | Bram Moolenaar <Bram@vim.org> | 2010-06-06 14:20:26 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2010-06-06 14:20:26 +0200 |
commit | 56be950094e10e68da1f901ba971c5f3e9821685 (patch) | |
tree | 9b77adba1105bac626534bfa85c5d72e187f53ac /src/blowfish.c | |
parent | 860cae1cec85aeb06668a2b071727c43869acf15 (diff) |
Fix a few compiler warnings. Fix crash with encrypted undo file.
Diffstat (limited to 'src/blowfish.c')
-rw-r--r-- | src/blowfish.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/blowfish.c b/src/blowfish.c index 1ab8eca8de..d47f463056 100644 --- 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]; |