From 77ec221feb207f88402234bb74a89c1f4b4f9135 Mon Sep 17 00:00:00 2001 From: Thomas Faber Date: Wed, 19 Apr 2017 10:33:58 +0000 Subject: [PATCH] [GDI32] - Use the number of WCHARs, not the number of ANSI chars in GetCharABCWidthsA. Fixes stack corruption when running gdi32_winetest:font CORE-11474 svn path=/trunk/; revision=74372 --- reactos/win32ss/gdi/gdi32/objects/font.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/win32ss/gdi/gdi32/objects/font.c b/reactos/win32ss/gdi/gdi32/objects/font.c index 98cf615eb76..6a9a90698cf 100644 --- a/reactos/win32ss/gdi/gdi32/objects/font.c +++ b/reactos/win32ss/gdi/gdi32/objects/font.c @@ -830,7 +830,7 @@ GetCharABCWidthsA( ret = NtGdiGetCharABCWidthsW( hdc, wstr[0], - (ULONG)count, + wlen - 1, (PWCHAR)wstr, GCABCW_NOFLOAT, (PVOID)lpabc);