aboutsummaryrefslogtreecommitdiffstats
path: root/g10/keyserver.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2006-12-06 10:16:50 +0000
committerWerner Koch <[email protected]>2006-12-06 10:16:50 +0000
commit0173cd5a9810622e38b76123528e83024fb59a0c (patch)
treeb8c52436a3d30842f2c59cfcf273a7934432321f /g10/keyserver.c
parent* keyedit.c (menu_clean): Show "already minimized" rather than (diff)
downloadgnupg-0173cd5a9810622e38b76123528e83024fb59a0c.tar.gz
gnupg-0173cd5a9810622e38b76123528e83024fb59a0c.zip
Fixes for CVE-2006-6235
Diffstat (limited to 'g10/keyserver.c')
-rw-r--r--g10/keyserver.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/g10/keyserver.c b/g10/keyserver.c
index 98086c30a..049b971a9 100644
--- a/g10/keyserver.c
+++ b/g10/keyserver.c
@@ -1196,23 +1196,24 @@ keyserver_spawn(enum ks_action action,strlist_t list,KEYDB_SEARCH_DESC *desc,
for(key=list;key!=NULL;key=key->next)
{
- armor_filter_context_t afx;
- IOBUF buffer=iobuf_temp();
+ armor_filter_context_t *afx;
+ IOBUF buffer = iobuf_temp ();
KBNODE block;
temp=NULL;
add_to_strlist(&temp,key->d);
- memset(&afx,0,sizeof(afx));
- afx.what=1;
+ afx = new_armor_context ();
+ afx->what = 1;
/* Tell the armor filter to use Unix-style \n line
endings, since we're going to fprintf this to a file
that (on Win32) is open in text mode. The win32 stdio
will transform the \n to \r\n and we'll end up with the
proper line endings on win32. This is a no-op on
Unix. */
- afx.eol[0]='\n';
- iobuf_push_filter(buffer,armor_filter,&afx);
+ afx->eol[0] = '\n';
+ push_armor_filter (afx, buffer);
+ release_armor_context (afx);
/* TODO: Remove Comment: lines from keys exported this
way? */