[WIN32K]
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Sat, 21 Apr 2012 16:05:24 +0000 (16:05 +0000)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Sat, 21 Apr 2012 16:05:24 +0000 (16:05 +0000)
In NtGdiGetTextExtentExW fail when Count is negative.

svn path=/trunk/; revision=56384

reactos/win32ss/gdi/ntgdi/text.c

index cc9cfdf..31dcbe2 100644 (file)
@@ -278,6 +278,12 @@ NtGdiGetTextExtentExW(
     LPINT Dx;
     PTEXTOBJ TextObj;
 
+    if ((LONG)Count < 0)
+    {
+        EngSetLastError(ERROR_INVALID_PARAMETER);
+        return FALSE;
+    }
+
     /* FIXME: Handle fl */
 
     if (0 == Count)