Author: jimtabor
Date: Sat Mar 26 02:10:04 2011
New Revision: 51147
URL:
http://svn.reactos.org/svn/reactos?rev=51147&view=rev
Log:
[GDI32]
- Patch by Thomas Faber: GetTextExtentPoint32 must not assume null termination of
lpString.
Modified:
trunk/reactos/dll/win32/gdi32/objects/text.c
Modified: trunk/reactos/dll/win32/gdi32/objects/text.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/objects/te…
==============================================================================
--- trunk/reactos/dll/win32/gdi32/objects/text.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/gdi32/objects/text.c [iso-8859-1] Sat Mar 26 02:10:04 2011
@@ -261,7 +261,8 @@
UNICODE_STRING StringU;
BOOL ret;
- RtlInitAnsiString(&StringA, (LPSTR)lpString);
+ StringA.Buffer = (LPSTR)lpString;
+ StringA.Length = cchString;
RtlAnsiStringToUnicodeString(&StringU, &StringA, TRUE);
ret = GetTextExtentPoint32W(hdc, StringU.Buffer, cchString, lpSize);