[svn] GnuPG - r4349 - branches/STABLE-BRANCH-1-4/g10
svn author wk
cvs at cvs.gnupg.org
Mon Nov 27 17:40:20 CET 2006
Author: wk
Date: 2006-11-27 17:40:14 +0100 (Mon, 27 Nov 2006)
New Revision: 4349
Modified:
branches/STABLE-BRANCH-1-4/g10/ChangeLog
branches/STABLE-BRANCH-1-4/g10/openfile.c
Log:
* openfile.c (ask_outfile_name): Fixed buffer overflow occurring
if make_printable_string returns a longer string. Fixes bug 728.
Modified: branches/STABLE-BRANCH-1-4/g10/ChangeLog
===================================================================
--- branches/STABLE-BRANCH-1-4/g10/ChangeLog 2006-11-23 10:47:36 UTC (rev 4348)
+++ branches/STABLE-BRANCH-1-4/g10/ChangeLog 2006-11-27 16:40:14 UTC (rev 4349)
@@ -1,3 +1,8 @@
+2006-11-27 Werner Koch <wk at g10code.com>
+
+ * openfile.c (ask_outfile_name): Fixed buffer overflow occurring
+ if make_printable_string returns a longer string. Fixes bug 728.
+
2006-10-23 Werner Koch <wk at g10code.com>
* gpg.c (main): New command --gpgconf-list.
Modified: branches/STABLE-BRANCH-1-4/g10/openfile.c
===================================================================
--- branches/STABLE-BRANCH-1-4/g10/openfile.c 2006-11-23 10:47:36 UTC (rev 4348)
+++ branches/STABLE-BRANCH-1-4/g10/openfile.c 2006-11-27 16:40:14 UTC (rev 4349)
@@ -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 );
More information about the Gnupg-commits
mailing list