- 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.

svn path=/trunk/; revision=31507
This commit is contained in:
Johannes Anderwald 2007-12-30 22:14:04 +00:00
parent 1927e3a6c8
commit 81de8eeb8d

View file

@ -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 @@ SetMaxDate(HWND hwndDlg, LCID lcid)
static INT
GetMaxDate(LCID lcid)
{
INT nMaxDateVal;
INT nMaxDateVal = 0;
GetCalendarInfo(lcid,
CAL_GREGORIAN,