summaryrefslogtreecommitdiffstats
path: root/g10
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2016-12-08 19:02:56 +0100
committerWerner Koch <wk@gnupg.org>2016-12-08 19:02:56 +0100
commitcb4c7abb774e2d95806d8b0ec6ea5cd130c1b5b8 (patch)
treeead5a6b4e8cbefab773836c6ccba1abc33e417e5 /g10
parentwks: New option --status-fd for gpg-wks-client. (diff)
downloadgnupg2-cb4c7abb774e2d95806d8b0ec6ea5cd130c1b5b8.tar.xz
gnupg2-cb4c7abb774e2d95806d8b0ec6ea5cd130c1b5b8.zip
Fix 2 compiler warnings.
* dirmngr/loadswdb.c: Set ERR on malloc failure. * g10/passphrase.c (passphrase_to_dek): Initialize all fields of HELP_S2K. Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'g10')
-rw-r--r--g10/passphrase.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/g10/passphrase.c b/g10/passphrase.c
index ccd232a4f..fb4ec4c85 100644
--- a/g10/passphrase.c
+++ b/g10/passphrase.c
@@ -319,8 +319,8 @@ passphrase_to_dek (int cipher_algo, STRING2KEY *s2k,
log_assert (create && !nocache);
/* This is used for the old rfc1991 mode
* Note: This must match the code in encode.c with opt.rfc1991 set */
+ memset (&help_s2k, 0, sizeof (help_s2k));
s2k = &help_s2k;
- s2k->mode = 0;
s2k->hash_algo = S2K_DIGEST_ALGO;
}