diff options
author | Werner Koch <[email protected]> | 2006-12-06 10:16:50 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2006-12-06 10:16:50 +0000 |
commit | 0173cd5a9810622e38b76123528e83024fb59a0c (patch) | |
tree | b8c52436a3d30842f2c59cfcf273a7934432321f /g10/gpg.c | |
parent | * keyedit.c (menu_clean): Show "already minimized" rather than (diff) | |
download | gnupg-0173cd5a9810622e38b76123528e83024fb59a0c.tar.gz gnupg-0173cd5a9810622e38b76123528e83024fb59a0c.zip |
Fixes for CVE-2006-6235
Diffstat (limited to 'g10/gpg.c')
-rw-r--r-- | g10/gpg.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -1753,7 +1753,7 @@ main (int argc, char **argv ) int may_coredump; strlist_t sl, remusr= NULL, locusr=NULL; strlist_t nrings=NULL, sec_nrings=NULL; - armor_filter_context_t afx; + armor_filter_context_t *afx = NULL; int detached_sig = 0; FILE *configfp = NULL; char *configname = NULL; @@ -3826,8 +3826,8 @@ main (int argc, char **argv ) if( !opt.no_armor ) { if( use_armor_filter( a ) ) { - memset( &afx, 0, sizeof afx); - iobuf_push_filter( a, armor_filter, &afx ); + afx = new_armor_context (); + push_armor_filter (afx, a); } } if( cmd == aListPackets ) { @@ -3843,6 +3843,7 @@ main (int argc, char **argv ) } /* cleanup */ + release_armor_context (afx); FREE_STRLIST(remusr); FREE_STRLIST(locusr); g10_exit(0); |