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: 1ddd69935d
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
1 changed files with 1 additions and 1 deletions

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;