From 1709b7ddc6f0856be42640524f4e7fbff08035ac Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Tue, 3 May 2016 20:57:55 +0200 Subject: alloc: check multiplications for overflows --- src/vector.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/vector.c') diff --git a/src/vector.c b/src/vector.c index 07eb274..aeeeebb 100644 --- a/src/vector.c +++ b/src/vector.c @@ -62,7 +62,7 @@ void _fastd_vector_resize(fastd_vector_desc_t *desc, void **data, size_t n, size if (alloc != desc->allocated) { desc->allocated = alloc; - *data = fastd_realloc(*data, alloc * elemsize); + *data = fastd_realloc_array(*data, alloc, elemsize); } } -- cgit v1.2.3