GetCharacterPlacementA: check FONT_mbtowc return value for validity

svn path=/trunk/; revision=42899
This commit is contained in:
Gregor Schneider 2009-08-24 00:00:06 +00:00
parent eda170fe74
commit 8e0dd42d55

View file

@ -323,6 +323,10 @@ GetCharacterPlacementA(
memcpy(&resultsW, lpResults, sizeof(resultsW));
lpStringW = FONT_mbtowc(hdc, lpString, uCount, &uCountW, &font_cp);
if (lpStringW == NULL)
{
return 0;
}
if(lpResults->lpOutString)
{
resultsW.lpOutString = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR)*uCountW);