From 737d167750f61b3307a7b86abc30041924e5eea6 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 14 Apr 2015 15:37:20 +0000 Subject: stack corruption fix git-svn-id: http://svn.miranda-ng.org/main/trunk@12814 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/utils/timezones.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/utils/timezones.cpp b/src/modules/utils/timezones.cpp index e2c271c140..9c7d3804ab 100644 --- a/src/modules/utils/timezones.cpp +++ b/src/modules/utils/timezones.cpp @@ -444,8 +444,8 @@ static INT_PTR TimestampToStringA(WPARAM wParam, LPARAM lParam) { DBTIMETOSTRING *tts = (DBTIMETOSTRING*)lParam; if (tts != NULL) { - TCHAR *szDest = (TCHAR*)alloca(tts->cbDest); - timeapiPrintTimeStamp(NULL, (mir_time)wParam, StrConvT(tts->szFormat), szDest, tts->cbDest, 0); + TCHAR *szDest = (TCHAR*)alloca(tts->cbDest*sizeof(TCHAR)); + timeapiPrintTimeStamp(NULL, (mir_time)wParam, _A2T(tts->szFormat), szDest, tts->cbDest, 0); WideCharToMultiByte(CP_ACP, 0, szDest, -1, tts->szDest, tts->cbDest, NULL, NULL); } return 0; -- cgit v1.2.3