diff --git a/reactos/win32ss/gdi/ntgdi/text.c b/reactos/win32ss/gdi/ntgdi/text.c index cc9cfdf29ee..31dcbe2ecfa 100644 --- a/reactos/win32ss/gdi/ntgdi/text.c +++ b/reactos/win32ss/gdi/ntgdi/text.c @@ -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)