Alexandre Julliard : gdi32: Compute the line parameters using the cropped coordinates to avoid overflows .

Alexandre Julliard julliard at winehq.org
Tue Jul 31 12:04:15 CDT 2012


Module: wine
Branch: master
Commit: 747d1631d5da53755119632ab035a0c32009a557
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=747d1631d5da53755119632ab035a0c32009a557

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue Jul 31 16:52:02 2012 +0200

gdi32: Compute the line parameters using the cropped coordinates to avoid overflows.

---

 dlls/gdi32/dibdrv/objects.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/dlls/gdi32/dibdrv/objects.c b/dlls/gdi32/dibdrv/objects.c
index f9736f6..4712dc1 100644
--- a/dlls/gdi32/dibdrv/objects.c
+++ b/dlls/gdi32/dibdrv/objects.c
@@ -616,7 +616,7 @@ static BOOL solid_pen_line(dibdrv_physdev *pdev, POINT *start, POINT *end, DWORD
         struct line_params line_params;
         POINT p1 = crop_coords( *start ), p2 = crop_coords( *end );
 
-        init_bres_params( start, end, &clip_params, &line_params, &rect );
+        init_bres_params( &p1, &p2, &clip_params, &line_params, &rect );
         if (!get_clipped_rects( &pdev->dib, &rect, pdev->clip, &clipped_rects )) return TRUE;
         for (i = 0; i < clipped_rects.count; i++)
         {
@@ -762,7 +762,7 @@ static BOOL solid_pen_line_region( dibdrv_physdev *pdev, POINT *start, POINT *en
         struct line_params line_params;
         POINT p1 = crop_coords( *start ), p2 = crop_coords( *end );
 
-        init_bres_params( start, end, &clip_params, &line_params, &rect );
+        init_bres_params( &p1, &p2, &clip_params, &line_params, &rect );
         if (clip_rect_to_dib( &pdev->dib, &rect ))
         {
             POINT clipped_start, clipped_end;
@@ -1030,7 +1030,7 @@ static BOOL dashed_pen_line(dibdrv_physdev *pdev, POINT *start, POINT *end)
         struct line_params line_params;
         POINT p1 = crop_coords( *start ), p2 = crop_coords( *end );
 
-        init_bres_params( start, end, &clip_params, &line_params, &rect );
+        init_bres_params( &p1, &p2, &clip_params, &line_params, &rect );
         get_clipped_rects( &pdev->dib, &rect, pdev->clip, &clipped_rects );
         for (i = 0; i < clipped_rects.count; i++)
         {




More information about the wine-cvs mailing list