mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-08 12:44:23 +01:00
g10: Fix uninitalized variable use in sign_file
* g10/sign.c (sign_file): Initialize gcry_md_hd_t to NULL. -- There are several jumps to leave before gcry_md_open is called so md should be initialized to NULL to avoid calling gcry_md_close on an uninitalized variable. GnuPG-Bug-Id: T6780
This commit is contained in:
parent
16b6b77532
commit
05ef8c0cc0
@ -1020,7 +1020,7 @@ sign_file (ctrl_t ctrl, strlist_t filenames, int detached, strlist_t locusr,
|
|||||||
const char *fname;
|
const char *fname;
|
||||||
armor_filter_context_t *afx;
|
armor_filter_context_t *afx;
|
||||||
compress_filter_context_t zfx;
|
compress_filter_context_t zfx;
|
||||||
gcry_md_hd_t md;
|
gcry_md_hd_t md = NULL;
|
||||||
md_filter_context_t mfx;
|
md_filter_context_t mfx;
|
||||||
md_thd_filter_context_t mfx2 = NULL;
|
md_thd_filter_context_t mfx2 = NULL;
|
||||||
text_filter_context_t tfx;
|
text_filter_context_t tfx;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user