diff --git a/dirmngr/loadswdb.c b/dirmngr/loadswdb.c index bc56c2ab3..2d6bdc126 100644 --- a/dirmngr/loadswdb.c +++ b/dirmngr/loadswdb.c @@ -272,7 +272,10 @@ dirmngr_load_swdb (ctrl_t ctrl, int force) /* Create the filename of the file with the keys. */ keyfile_fname = make_filename_try (gnupg_datadir (), "distsigkey.gpg", NULL); if (!keyfile_fname) - goto leave; + { + err = gpg_error_from_syserror (); + goto leave; + } /* Fetch the swdb from the web. */ err = fetch_file (ctrl, "https://versions.gnupg.org/swdb.lst", &swdb); 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; }