[cairo] [PATCH] tristrip: Correctly resize points array

Henry (Yu) Song - SISA hsong at sisa.samsung.com
Tue Oct 18 13:06:26 PDT 2011


Hi, Martin

Can you forward comments to henry.song at samsung.com,  I still don't get your forwarded message.

Thanks

Henry

-----Original Message-----
From: cairo-bounces+hsong=sisa.samsung.com at cairographics.org [mailto:cairo-bounces+hsong=sisa.samsung.com at cairographics.org] On Behalf Of Martin Robinson
Sent: Friday, October 14, 2011 4:41 PM
To: cairo at cairographics.org
Subject: [cairo] [PATCH] tristrip: Correctly resize points array

cairo_tristrip_t grows its array of points using realloc.
Use the size of cairo_point_t instead of cairo_trapezoid_t
to size the new array.
---
 src/cairo-tristrip.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/cairo-tristrip.c b/src/cairo-tristrip.c
index bb4972f..da08267 100644
--- a/src/cairo-tristrip.c
+++ b/src/cairo-tristrip.c
@@ -98,7 +98,7 @@ _cairo_tristrip_grow (cairo_tristrip_t *strip)
 	    memcpy (points, strip->points, sizeof (strip->points_embedded));
     } else {
 	points = _cairo_realloc_ab (strip->points,
-	                               new_size, sizeof (cairo_trapezoid_t));
+				    new_size, sizeof (cairo_point_t));
     }
      if (unlikely (points == NULL)) {
-- 
1.7.4.1

--
cairo mailing list
cairo at cairographics.org
http://lists.cairographics.org/mailman/listinfo/cairo


More information about the cairo mailing list