1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

Fix a couple of minor bugs.

This commit is contained in:
Werner Koch 2009-06-24 14:01:20 +00:00
parent 9c5313a791
commit 64f24da283
5 changed files with 18 additions and 7 deletions

View file

@ -1003,7 +1003,7 @@ passphrase_to_dek( u32 *keyid, int pubkey_algo,
get_last_passphrase(). */
dek = xmalloc_secure_clear ( sizeof *dek );
dek->algo = cipher_algo;
if( !*pw && mode == 2 )
if( (!pw || !*pw) && mode == 2 )
dek->keylen = 0;
else
hash_passphrase( dek, pw, s2k, mode==2 );