summaryrefslogtreecommitdiffstats
path: root/g10/passphrase.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2009-06-24 16:03:09 +0200
committerWerner Koch <wk@gnupg.org>2009-06-24 16:03:09 +0200
commit2e0ce7d97f0de998cdf8e95e17ce169b7cae91cd (patch)
treec4042057b382f755d3bc1799e9c78d3355436fa2 /g10/passphrase.c
parentPost release updates (diff)
downloadgnupg2-2e0ce7d97f0de998cdf8e95e17ce169b7cae91cd.tar.xz
gnupg2-2e0ce7d97f0de998cdf8e95e17ce169b7cae91cd.zip
Fixed a bunch of little bugs as reported by Fabian Keil.
Still one problem left; marked with a gcc #warning.
Diffstat (limited to 'g10/passphrase.c')
-rw-r--r--g10/passphrase.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/g10/passphrase.c b/g10/passphrase.c
index 3742738e9..d34f5fa92 100644
--- a/g10/passphrase.c
+++ b/g10/passphrase.c
@@ -600,7 +600,7 @@ passphrase_to_dek_ext (u32 *keyid, int pubkey_algo,
get_last_passphrase(). */
dek = xmalloc_secure_clear ( sizeof *dek );
dek->algo = cipher_algo;
- if ( !*pw && (mode == 2 || mode == 4))
+ if ( (!pw || !*pw) && (mode == 2 || mode == 4))
dek->keylen = 0;
else
hash_passphrase (dek, pw, s2k);