AUDIT: r15409 - gnucash/trunk/src/register/register-gnome - Use MAX_DATE_LENGTH+1 as length for some date buffers.

Andreas Köhler andi5 at cvs.gnucash.org
Sun Jan 21 12:51:13 EST 2007


Author: andi5
Date: 2007-01-21 12:51:12 -0500 (Sun, 21 Jan 2007)
New Revision: 15409
Trac: http://svn.gnucash.org/trac/changeset/15409

Modified:
   gnucash/trunk/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>.

BP


Modified: gnucash/trunk/src/register/register-gnome/datecell-gnome.c
===================================================================
--- gnucash/trunk/src/register/register-gnome/datecell-gnome.c	2007-01-21 17:03:36 UTC (rev 15408)
+++ gnucash/trunk/src/register/register-gnome/datecell-gnome.c	2007-01-21 17:51:12 UTC (rev 15409)
@@ -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