Author: khornicek Date: Wed Feb 22 10:26:40 2017 New Revision: 73878 URL: http://svn.reactos.org/svn/reactos?rev=73878&view=rev Log: [NTGDI] - Consider the return value from IntFillArc in IntArc. CID 1237076 - Remove an useless check in ENTRY_ReferenceEntryByHandle CID 731587 - Prevent an unlikely memory leak in PATH_WidenPath. CID 716634 - Minor cleanup.
Modified: trunk/reactos/win32ss/gdi/ntgdi/arc.c trunk/reactos/win32ss/gdi/ntgdi/drawing.c trunk/reactos/win32ss/gdi/ntgdi/gdiobj.c trunk/reactos/win32ss/gdi/ntgdi/path.c Modified: trunk/reactos/win32ss/gdi/ntgdi/arc.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/arc.c?rev=73878&r1=73877&r2=73878&view=diff ============================================================================== --- trunk/reactos/win32ss/gdi/ntgdi/arc.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/gdi/ntgdi/arc.c [iso-8859-1] Wed Feb 22 10:26:40 2017 @@ -143,15 +143,18 @@ arctype); } - ret = IntDrawArc( dc, - RectBounds.left, - RectBounds.top, - abs(RectBounds.right-RectBounds.left), // Width - abs(RectBounds.bottom-RectBounds.top), // Height - AngleStart, - AngleEnd, - arctype, - pbrPen); + if(ret) + { + ret = IntDrawArc( dc, + RectBounds.left, + RectBounds.top, + abs(RectBounds.right-RectBounds.left), // Width + abs(RectBounds.bottom-RectBounds.top), // Height + AngleStart, + AngleEnd, + arctype, + pbrPen); + } psurf = dc->dclevel.pSurface; if (NULL == psurf) Modified: trunk/reactos/win32ss/gdi/ntgdi/drawing.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/drawing.c?rev=73878&r1=73877&r2=73878&view=diff ============================================================================== --- trunk/reactos/win32ss/gdi/ntgdi/drawing.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/gdi/ntgdi/drawing.c [iso-8859-1] Wed Feb 22 10:26:40 2017 @@ -161,8 +161,6 @@ int innerX = 0, prevx, prevy, W; Rect r1, r2; int result = 1; - -// START_DEBUG(); if ((r.width <= 2) || (r.height <= 2)) return app_fill_rect(g, r, pbrush, TRUE); @@ -636,8 +634,6 @@ Rect r1, r2; int result = 1; -// START_DEBUG(); - if ((r.width <= 2) || (r.height <= 2)) return app_fill_rect(g, r, pbrush, FALSE); @@ -810,8 +806,6 @@ /* Line descriptions */ POINT p0, p1, p2; -// START_DEBUG(); - /* If angles differ by 360 degrees or more, close the shape */ if ((start_angle + 360 <= end_angle) || (start_angle - 360 >= end_angle)) @@ -1009,8 +1003,6 @@ /* Line descriptions */ POINT p0, p1, p2; - -// START_DEBUG(); /* If angles differ by 360 degrees or more, close the shape */ if ((start_angle + 360 <= end_angle) || Modified: trunk/reactos/win32ss/gdi/ntgdi/gdiobj.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/gdiobj.c?rev=73878&r1=73877&r2=73878&view=diff ============================================================================== --- trunk/reactos/win32ss/gdi/ntgdi/gdiobj.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/gdi/ntgdi/gdiobj.c [iso-8859-1] Wed Feb 22 10:26:40 2017 @@ -480,7 +480,6 @@ /* Get the handle index and check if its too big */ ulIndex = GDI_HANDLE_GET_INDEX(hobj); - if (ulIndex >= GDI_HANDLE_COUNT) return NULL; /* Get pointer to the entry */ pentry = &gpentHmgr[ulIndex]; Modified: trunk/reactos/win32ss/gdi/ntgdi/path.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/path.c?rev=73878&r1=73877&r2=73878&view=diff ============================================================================== --- trunk/reactos/win32ss/gdi/ntgdi/path.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/gdi/ntgdi/path.c [iso-8859-1] Wed Feb 22 10:26:40 2017 @@ -1813,6 +1813,8 @@ DPRINT1("Expected PT_MOVETO %s, got path flag %c\n", i == 0 ? "as first point" : "after PT_CLOSEFIGURE", flat_path->pFlags[i]); + if (pStrokes) + ExFreePoolWithTag(pStrokes, TAG_PATH); PATH_UnlockPath(flat_path); PATH_Delete(flat_path->BaseObject.hHmgr); return FALSE; @@ -1867,6 +1869,8 @@ break; default: DPRINT1("Got path flag %c\n", flat_path->pFlags[i]); + if (pStrokes) + ExFreePoolWithTag(pStrokes, TAG_PATH); PATH_UnlockPath(flat_path); PATH_Delete(flat_path->BaseObject.hHmgr); return FALSE;