From a7c654b0751029a50d35605a11caa809f6859a2c Mon Sep 17 00:00:00 2001 From: Gregor Schneider Date: Mon, 17 Aug 2009 00:13:44 +0000 Subject: [PATCH] Handle a missing output buffer in NtGdiGetCharABCWidthsW svn path=/trunk/; revision=42748 --- reactos/subsystems/win32/win32k/objects/freetype.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/reactos/subsystems/win32/win32k/objects/freetype.c b/reactos/subsystems/win32/win32k/objects/freetype.c index 693d2c6214e..c13c31b9e05 100644 --- a/reactos/subsystems/win32/win32k/objects/freetype.c +++ b/reactos/subsystems/win32/win32k/objects/freetype.c @@ -3761,6 +3761,12 @@ NtGdiGetCharABCWidthsW( return FALSE; } + if (!Buffer) + { + SetLastWin32Error(ERROR_INVALID_PARAMETER); + return FALSE; + } + BufferSize = Count * sizeof(ABC); // Same size! SafeBuff = ExAllocatePoolWithTag(PagedPool, BufferSize, TAG_GDITEXT); if (!fl) SafeBuffF = (LPABCFLOAT) SafeBuff; -- 2.17.1