mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 19:12:57 +00:00
GetCharacterPlacementA: check FONT_mbtowc return value for validity
svn path=/trunk/; revision=42899
This commit is contained in:
parent
eda170fe74
commit
8e0dd42d55
1 changed files with 4 additions and 0 deletions
|
@ -323,6 +323,10 @@ GetCharacterPlacementA(
|
||||||
memcpy(&resultsW, lpResults, sizeof(resultsW));
|
memcpy(&resultsW, lpResults, sizeof(resultsW));
|
||||||
|
|
||||||
lpStringW = FONT_mbtowc(hdc, lpString, uCount, &uCountW, &font_cp);
|
lpStringW = FONT_mbtowc(hdc, lpString, uCount, &uCountW, &font_cp);
|
||||||
|
if (lpStringW == NULL)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
if(lpResults->lpOutString)
|
if(lpResults->lpOutString)
|
||||||
{
|
{
|
||||||
resultsW.lpOutString = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR)*uCountW);
|
resultsW.lpOutString = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR)*uCountW);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue