mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 06:53:37 +00:00
fixed infinite loop if the number of clipping rectangles exceeded the maximum allowed.
svn path=/trunk/; revision=7369
This commit is contained in:
parent
3c069498cc
commit
f8eea2e937
1 changed files with 5 additions and 2 deletions
|
@ -16,7 +16,7 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
/* $Id: clip.c,v 1.17 2003/10/30 08:56:37 gvg Exp $
|
/* $Id: clip.c,v 1.18 2003/12/31 14:43:48 weiden Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -328,7 +328,10 @@ CLIPOBJ_bEnum(IN CLIPOBJ* ClipObj,
|
||||||
nCopy = min( ClipGDI->EnumMax - ClipGDI->EnumPos,
|
nCopy = min( ClipGDI->EnumMax - ClipGDI->EnumPos,
|
||||||
min( ClipGDI->EnumRects.c - ClipGDI->EnumPos,
|
min( ClipGDI->EnumRects.c - ClipGDI->EnumPos,
|
||||||
(ObjSize - sizeof(ULONG)) / sizeof(RECTL)));
|
(ObjSize - sizeof(ULONG)) / sizeof(RECTL)));
|
||||||
|
if(nCopy == 0)
|
||||||
|
{
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
RtlCopyMemory( pERects->arcl, ClipGDI->EnumRects.arcl + ClipGDI->EnumPos,
|
RtlCopyMemory( pERects->arcl, ClipGDI->EnumRects.arcl + ClipGDI->EnumPos,
|
||||||
nCopy * sizeof(RECTL) );
|
nCopy * sizeof(RECTL) );
|
||||||
pERects->c = nCopy;
|
pERects->c = nCopy;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue