1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

gpg: Fix a possible segv due to an uninitialized gcrypt context.

* g10/sign.c (sign_symencrypt_file): Initialize MD for the error case.
--

Reported-by: Falko Strenzke
Fixes-commit: 1ddd69935da629188dcf9215cd9e7a8f68b34a97
in the not yet released master branch.
This commit is contained in:
Werner Koch 2024-03-06 15:49:51 +01:00
parent 40227e42ea
commit 79d0e52b2d
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B

View File

@ -1586,7 +1586,7 @@ sign_symencrypt_file (ctrl_t ctrl, const char *fname, strlist_t locusr)
compress_filter_context_t zfx;
md_filter_context_t mfx;
md_thd_filter_context_t mfx2 = NULL;
gcry_md_hd_t md;
gcry_md_hd_t md = NULL;
text_filter_context_t tfx;
cipher_filter_context_t cfx;
iobuf_t inp = NULL;