Commit 89a558fe authored by Akihiro Sagawa's avatar Akihiro Sagawa Committed by Alexandre Julliard

kernel32: Avoid uninitialised value read in GetCalendarInfoA.

parent 6a4c1469
...@@ -629,7 +629,7 @@ int WINAPI GetCalendarInfoA(LCID lcid, CALID Calendar, CALTYPE CalType, ...@@ -629,7 +629,7 @@ int WINAPI GetCalendarInfoA(LCID lcid, CALID Calendar, CALTYPE CalType,
ret = GetCalendarInfoW(lcid, Calendar, CalType, lpCalDataW, cchData, lpValue); ret = GetCalendarInfoW(lcid, Calendar, CalType, lpCalDataW, cchData, lpValue);
if(ret && lpCalDataW && lpCalData) if(ret && lpCalDataW && lpCalData)
WideCharToMultiByte(CP_ACP, 0, lpCalDataW, cchData, lpCalData, cchData, NULL, NULL); WideCharToMultiByte(CP_ACP, 0, lpCalDataW, -1, lpCalData, cchData, NULL, NULL);
else if (CalType & CAL_RETURN_NUMBER) else if (CalType & CAL_RETURN_NUMBER)
ret *= sizeof(WCHAR); ret *= sizeof(WCHAR);
HeapFree(GetProcessHeap(), 0, lpCalDataW); HeapFree(GetProcessHeap(), 0, lpCalDataW);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment