Handle a missing output buffer in NtGdiGetCharABCWidthsW
authorGregor Schneider <grschneider@gmail.com>
Mon, 17 Aug 2009 00:13:44 +0000 (00:13 +0000)
committerGregor Schneider <grschneider@gmail.com>
Mon, 17 Aug 2009 00:13:44 +0000 (00:13 +0000)
svn path=/trunk/; revision=42748

reactos/subsystems/win32/win32k/objects/freetype.c

index 693d2c6..c13c31b 100644 (file)
@@ -3761,6 +3761,12 @@ NtGdiGetCharABCWidthsW(
         return FALSE;
     }
 
         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;
     BufferSize = Count * sizeof(ABC); // Same size!
     SafeBuff = ExAllocatePoolWithTag(PagedPool, BufferSize, TAG_GDITEXT);
     if (!fl) SafeBuffF = (LPABCFLOAT) SafeBuff;