diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2007-10-03 23:19:10 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2007-10-04 00:42:29 +0100 |
commit | e49bcde27f88e21d5b8037a0089a226096f6514b (patch) | |
tree | 81093fdb6b2288c7338c73da2936812e3362489c /src/cairo-array.c | |
parent | 8cba73a36c4ec42601388bb9374f3182651bfe60 (diff) | |
download | cairo-e49bcde27f88e21d5b8037a0089a226096f6514b.tar.gz |
[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-array.c')
-rw-r--r-- | src/cairo-array.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cairo-array.c b/src/cairo-array.c index ff8cce409..3525c78d6 100644 --- a/src/cairo-array.c +++ b/src/cairo-array.c @@ -138,8 +138,8 @@ _cairo_array_grow_by (cairo_array_t *array, int additional) } array->size = new_size; - new_elements = realloc (*array->elements, - array->size * array->element_size); + new_elements = _cairo_realloc_ab (*array->elements, + array->size, array->element_size); if (new_elements == NULL) { array->size = old_size; |