gpg2/gpg2-1.9.22-CVE-2006-6169.diff

14 lines
364 B
Diff

--- g10/openfile.c
+++ g10/openfile.c
@@ -144,8 +144,8 @@
s = _("Enter new filename");
- n = strlen(s) + namelen + 10;
defname = name && namelen? make_printable_string( name, namelen, 0): NULL;
+ n = strlen(s) + (defname?strlen (defname):0) + 10;
prompt = xmalloc(n);
if( defname )
sprintf(prompt, "%s [%s]: ", s, defname );