Author: janderwald
Date: Mon Dec 31 01:14:04 2007
New Revision: 31507
URL:
http://svn.reactos.org/svn/reactos?rev=31507&view=rev
Log:
- prevent buffer overflow
- zero initialize value to prevent random values being returned from unimplemented
GetCalendarInfoA|W
- fixes bug 2918
See issue #2918 for more details.
Modified:
trunk/reactos/dll/cpl/intl/date.c
Modified: trunk/reactos/dll/cpl/intl/date.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/intl/date.c?rev=31…
==============================================================================
--- trunk/reactos/dll/cpl/intl/date.c (original)
+++ trunk/reactos/dll/cpl/intl/date.c Mon Dec 31 01:14:04 2007
@@ -34,7 +34,7 @@
/* GLOBALS ******************************************************************/
-#define YEAR_STR_MAX_SIZE 4
+#define YEAR_STR_MAX_SIZE 5
#define MAX_SHRT_DATE_SEPARATORS 3
#define STD_DATE_SEP _T(".")
#define YEAR_DIFF (99)
@@ -425,7 +425,7 @@
static INT
GetMaxDate(LCID lcid)
{
- INT nMaxDateVal;
+ INT nMaxDateVal = 0;
GetCalendarInfo(lcid,
CAL_GREGORIAN,