Author: gschneider
Date: Mon Aug 24 02:00:06 2009
New Revision: 42899
URL:
http://svn.reactos.org/svn/reactos?rev=42899&view=rev
Log:
GetCharacterPlacementA: check FONT_mbtowc return value for validity
Modified:
trunk/reactos/dll/win32/gdi32/objects/font.c
Modified: trunk/reactos/dll/win32/gdi32/objects/font.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/objects/fo…
==============================================================================
--- trunk/reactos/dll/win32/gdi32/objects/font.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/gdi32/objects/font.c [iso-8859-1] Mon Aug 24 02:00:06 2009
@@ -323,6 +323,10 @@
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);