summaryrefslogtreecommitdiff
path: root/draw/imagesmooth.c
diff options
context:
space:
mode:
Diffstat (limited to 'draw/imagesmooth.c')
-rw-r--r--draw/imagesmooth.c2
1 files changed, 2 insertions, 0 deletions
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;