From 34e909ecc9a579f37b14fee86aa1ea7ba5855c2a Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Sat, 22 Nov 2014 09:07:33 +0000 Subject: [PATCH] [WIN32K] - In XFORMOBJ_bApplyXform do not overwrite the data in the input buffer - Make XFORMOBJ_bXformFixPoints return VOID instead of BOOL svn path=/trunk/; revision=65445 --- reactos/subsystems/win32/csrsrv/thredsup.c | 2 +- reactos/win32ss/gdi/ntgdi/xformobj.c | 31 +++++++++++----------- 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/reactos/subsystems/win32/csrsrv/thredsup.c b/reactos/subsystems/win32/csrsrv/thredsup.c index 87b471b8a17..b0cfac8314b 100644 --- a/reactos/subsystems/win32/csrsrv/thredsup.c +++ b/reactos/subsystems/win32/csrsrv/thredsup.c @@ -309,7 +309,7 @@ CsrInsertThread(IN PCSR_PROCESS Process, sizeof(ThreadInfo), NULL); if (!NT_SUCCESS(Status)) return Status; - if (ThreadInfo == TRUE) return STATUS_THREAD_IS_TERMINATING; + if (ThreadInfo) return STATUS_THREAD_IS_TERMINATING; /* Insert it into the Regular List */ InsertTailList(&Process->ThreadList, &Thread->Link); diff --git a/reactos/win32ss/gdi/ntgdi/xformobj.c b/reactos/win32ss/gdi/ntgdi/xformobj.c index dbd8e22501b..fb6deb6d02c 100644 --- a/reactos/win32ss/gdi/ntgdi/xformobj.c +++ b/reactos/win32ss/gdi/ntgdi/xformobj.c @@ -297,10 +297,10 @@ XFORMOBJ_iInverse( return XFORMOBJ_UpdateAccel(pxoDst); } - -BOOL +static +VOID NTAPI -XFORMOBJ_bXformFixPoints( +XFORMOBJ_vXformFixPoints( IN XFORMOBJ *pxo, IN ULONG cPoints, IN PPOINTL pptIn, @@ -426,8 +426,6 @@ XFORMOBJ_bXformFixPoints( } while (--i >= 0); } - - return TRUE; } /** Public functions **********************************************************/ @@ -500,7 +498,7 @@ XFORMOBJ_bApplyXform( { MATRIX mx; XFORMOBJ xoInv; - POINTL *pptl; + PPOINTL pptlIn, pptlOut; INT i; /* Check parameters */ @@ -523,28 +521,29 @@ XFORMOBJ_bApplyXform( /* Convert POINTL to POINTFIX? */ if (iMode == XF_LTOFX || iMode == XF_LTOL || iMode == XF_INV_LTOL) { - pptl = pvIn; + pptlIn = pvIn; + pptlOut = pvOut; for (i = cPoints - 1; i >= 0; i--) { - pptl[i].x = LONG2FIX(pptl[i].x); - pptl[i].y = LONG2FIX(pptl[i].y); + pptlOut[i].x = LONG2FIX(pptlIn[i].x); + pptlOut[i].y = LONG2FIX(pptlIn[i].y); } + + /* The input is in the out buffer now! */ + pvIn = pvOut; } /* Do the actual fixpoint transformation */ - if (!XFORMOBJ_bXformFixPoints(pxo, cPoints, pvIn, pvOut)) - { - return FALSE; - } + XFORMOBJ_vXformFixPoints(pxo, cPoints, pvIn, pvOut); /* Convert POINTFIX to POINTL? */ if (iMode == XF_INV_FXTOL || iMode == XF_INV_LTOL || iMode == XF_LTOL) { - pptl = pvOut; + pptlOut = pvOut; for (i = cPoints - 1; i >= 0; i--) { - pptl[i].x = FIX2LONG(pptl[i].x); - pptl[i].y = FIX2LONG(pptl[i].y); + pptlOut[i].x = FIX2LONG(pptlOut[i].x); + pptlOut[i].y = FIX2LONG(pptlOut[i].y); } }