From 8355256a0fa6eedaa02a4e7b8ba3c2dbd58fe567 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Thu, 3 Feb 2011 10:38:01 +0000 Subject: Various patches from SumatraPDF. --- draw/imagesmooth.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'draw/imagesmooth.c') diff --git a/draw/imagesmooth.c b/draw/imagesmooth.c index c1002f46..67b5f481 100644 --- a/draw/imagesmooth.c +++ b/draw/imagesmooth.c @@ -1108,6 +1108,8 @@ 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; + if (temp_span <= 0 || temp_rows > INT_MAX / temp_span) + goto cleanup; temp = fz_calloc(temp_span*temp_rows, sizeof(int)); if (temp == NULL) goto cleanup; -- cgit v1.2.3