summaryrefslogtreecommitdiff
path: root/src/cairo-spline.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2007-10-03 23:19:10 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2007-10-04 00:42:29 +0100
commite49bcde27f88e21d5b8037a0089a226096f6514b (patch)
tree81093fdb6b2288c7338c73da2936812e3362489c /src/cairo-spline.c
parent8cba73a36c4ec42601388bb9374f3182651bfe60 (diff)
[malloc] Check for integer overflow when realloc'ing.
Perform similar sanity checks to Vlad's _cairo_malloc_ab() but on the arguments to realloc instead.
Diffstat (limited to 'src/cairo-spline.c')
-rw-r--r--src/cairo-spline.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cairo-spline.c b/src/cairo-spline.c
index db748b30..70c4ede6 100644
--- a/src/cairo-spline.c
+++ b/src/cairo-spline.c
@@ -113,7 +113,8 @@ _cairo_spline_grow (cairo_spline_t *spline)
if (new_points)
memcpy (new_points, spline->points, old_size * sizeof (cairo_point_t));
} else {
- new_points = realloc (spline->points, new_size * sizeof (cairo_point_t));
+ new_points = _cairo_realloc_ab (spline->points,
+ new_size, sizeof (cairo_point_t));
}
if (new_points == NULL) {