diff options
author | Tor Andersson <tor@ghostscript.com> | 2011-02-03 10:38:01 +0000 |
---|---|---|
committer | Tor Andersson <tor@ghostscript.com> | 2011-02-03 10:38:01 +0000 |
commit | 8355256a0fa6eedaa02a4e7b8ba3c2dbd58fe567 (patch) | |
tree | 5b3ffc94c327ff1a2eafbff99240644f621d29aa /draw/imagesmooth.c | |
parent | b9d32b1d76e298db1eaa7f42bf14c67496a5804d (diff) | |
download | mupdf-8355256a0fa6eedaa02a4e7b8ba3c2dbd58fe567.tar.xz |
Various patches from SumatraPDF.
Diffstat (limited to 'draw/imagesmooth.c')
-rw-r--r-- | draw/imagesmooth.c | 2 |
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; |