r15440 - gnucash/branches/2.0 - Use MAX_DATE_LENGTH+1 as length for some date buffers.
Derek Atkins
warlord at cvs.gnucash.org
Sat Jan 27 23:08:58 EST 2007
Author: warlord
Date: 2007-01-27 23:08:56 -0500 (Sat, 27 Jan 2007)
New Revision: 15440
Trac: http://svn.gnucash.org/trac/changeset/15440
Modified:
gnucash/branches/2.0/
gnucash/branches/2.0/ChangeLog
gnucash/branches/2.0/src/register/register-gnome/datecell-gnome.c
Log:
Use MAX_DATE_LENGTH+1 as length for some date buffers.
Avoid memory corruption by reserving enough bytes on the stack for a
date buffer. Patch by Richard Earnshaw <rearnsha at netbsd.org>.
Merge from r15409
Property changes on: gnucash/branches/2.0
___________________________________________________________________
Name: svk:merge
- 3889ce50-311e-0410-a464-f059747ec5d1:/local/gnucash/branches/2.0:697
d2ab10a8-8a95-4986-baff-8d511d9f15b2:/local/gnucash/branches/2.0:13971
d2ab10a8-8a95-4986-baff-8d511d9f15b2:/local/gnucash/trunk:13282
+ 3889ce50-311e-0410-a464-f059747ec5d1:/local/gnucash/branches/2.0:697
d2ab10a8-8a95-4986-baff-8d511d9f15b2:/local/gnucash/branches/2.0:13972
d2ab10a8-8a95-4986-baff-8d511d9f15b2:/local/gnucash/trunk:13282
Modified: gnucash/branches/2.0/ChangeLog
===================================================================
--- gnucash/branches/2.0/ChangeLog 2007-01-28 04:08:39 UTC (rev 15439)
+++ gnucash/branches/2.0/ChangeLog 2007-01-28 04:08:56 UTC (rev 15440)
@@ -12,6 +12,10 @@
* Adjust box packing in payment dialog. Fix #393024.
+ * Use MAX_DATE_LENGTH+1 as length for some date buffers.
+ Avoid memory corruption by reserving enough bytes on the stack for a
+ date buffer. Patch by Richard Earnshaw <rearnsha at netbsd.org>.
+
2007-01-12 Andreas Köhler <andi5.py at gmx.net>
* Translate expenses in mortgage/loan druid. Fixes #393436.
Modified: gnucash/branches/2.0/src/register/register-gnome/datecell-gnome.c
===================================================================
--- gnucash/branches/2.0/src/register/register-gnome/datecell-gnome.c 2007-01-28 04:08:39 UTC (rev 15439)
+++ gnucash/branches/2.0/src/register/register-gnome/datecell-gnome.c 2007-01-28 04:08:56 UTC (rev 15440)
@@ -46,7 +46,7 @@
#include "gnucash-sheet.h"
-#define DATE_BUF 30
+#define DATE_BUF (MAX_DATE_LENGTH+1)
typedef struct _PopBox
{
More information about the gnucash-changes
mailing list