crypt32/tests: Fixed buffer overflow in encode test.

This commit is contained in:
Marcus Meissner 2007-10-07 14:24:41 +02:00 committed by Alexandre Julliard
parent 2226ddcadf
commit 7689953404
1 changed files with 2 additions and 2 deletions

View File

@ -464,7 +464,7 @@ static void testTimeEncoding(DWORD dwEncoding, LPCSTR structType,
static const char *printSystemTime(const SYSTEMTIME *st) static const char *printSystemTime(const SYSTEMTIME *st)
{ {
static char buf[22]; static char buf[25];
sprintf(buf, "%02d-%02d-%04d %02d:%02d:%02d.%03d", st->wMonth, st->wDay, sprintf(buf, "%02d-%02d-%04d %02d:%02d:%02d.%03d", st->wMonth, st->wDay,
st->wYear, st->wHour, st->wMinute, st->wSecond, st->wMilliseconds); st->wYear, st->wHour, st->wMinute, st->wSecond, st->wMilliseconds);
@ -473,7 +473,7 @@ static const char *printSystemTime(const SYSTEMTIME *st)
static const char *printFileTime(const FILETIME *ft) static const char *printFileTime(const FILETIME *ft)
{ {
static char buf[22]; static char buf[25];
SYSTEMTIME st; SYSTEMTIME st;
FileTimeToSystemTime(ft, &st); FileTimeToSystemTime(ft, &st);