From 3802ebf92723382070258bcd43771b2f4186c03f Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Thu, 27 Jan 2011 22:35:26 +0000 Subject: Add fz_calloc function to check for integer overflow when allocating arrays, and change the signature of fz_realloc to match. --- draw/imagesmooth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'draw/imagesmooth.c') diff --git a/draw/imagesmooth.c b/draw/imagesmooth.c index 341e0377..2cbe01f9 100644 --- a/draw/imagesmooth.c +++ b/draw/imagesmooth.c @@ -1108,7 +1108,7 @@ fz_smoothscalepixmap(fz_pixmap *src, float x, float y, float w, float h) temp_span = contrib_cols->count * src->n; temp_rows = contrib_rows->max_len; - temp = fz_malloc(sizeof(int)*temp_span*temp_rows); + temp = fz_calloc(temp_span*temp_rows, sizeof(int)); if (temp == NULL) goto cleanup; switch (src->n) -- cgit v1.2.3