- really check whether the requested pixel is outside of the surface in NtGdiGetPixel
CORE-12820

svn path=/trunk/; revision=75818
This commit is contained in:
Kamil Hornicek 2017-09-10 09:09:57 +00:00
parent 6116aa816b
commit 3c1b7f0877

View file

@ -1496,7 +1496,9 @@ NtGdiGetPixel(
/* Check if the pixel is outside the surface */
psurfSrc = pdc->dclevel.pSurface;
if ((ptlSrc.x >= psurfSrc->SurfObj.sizlBitmap.cx) ||
(ptlSrc.y >= psurfSrc->SurfObj.sizlBitmap.cy))
(ptlSrc.y >= psurfSrc->SurfObj.sizlBitmap.cy) ||
(ptlSrc.x < 0) ||
(ptlSrc.y < 0))
{
/* Fail! */
goto leave;