https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c1ec0d92e24c9a27eb5ed…
commit c1ec0d92e24c9a27eb5ed2eae78268dda06626ad
Author: Doug Lyons <douglyons(a)douglyons.com>
AuthorDate: Sun Aug 4 18:43:49 2019 -0500
Commit: Thomas Faber <thomas.faber(a)reactos.org>
CommitDate: Wed Aug 7 07:47:47 2019 +0200
[WIN32K:NTGDI] Fix ASSERTS in REGION_bXformRgn. CORE-15992
---
win32ss/gdi/ntgdi/region.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/win32ss/gdi/ntgdi/region.c b/win32ss/gdi/ntgdi/region.c
index 1456602852d..38bf3d377fa 100644
--- a/win32ss/gdi/ntgdi/region.c
+++ b/win32ss/gdi/ntgdi/region.c
@@ -2084,7 +2084,7 @@ REGION_bXformRgn(
_In_ PMATRIX pmx)
{
XFORMOBJ xo;
- ULONG i, j, cjSize;
+ ULONG i, cjSize;
PPOINT ppt;
PULONG pcPoints;
RECT rect;
@@ -2149,11 +2149,8 @@ REGION_bXformRgn(
/* Loop all rects in the region */
for (i = 0; i < prgn->rdh.nCount - 1; i++)
{
- for (j = i; i < prgn->rdh.nCount; i++)
- {
- NT_ASSERT(prgn->Buffer[i].top < prgn->Buffer[i].bottom);
- NT_ASSERT(prgn->Buffer[j].top >= prgn->Buffer[i].top);
- }
+ NT_ASSERT(prgn->Buffer[i].top <= prgn->Buffer[i].bottom);
+ NT_ASSERT(prgn->Buffer[i + 1].top >= prgn->Buffer[i].top);
}
return TRUE;