diff options
author | Tor Andersson <tor@ghostscript.com> | 2011-01-27 22:35:26 +0000 |
---|---|---|
committer | Tor Andersson <tor@ghostscript.com> | 2011-01-27 22:35:26 +0000 |
commit | 3802ebf92723382070258bcd43771b2f4186c03f (patch) | |
tree | cb0ca60a270dd9b73918015ee8e8cd86b1dc0296 /draw/imagesmooth.c | |
parent | 836d6cb3d16e94929be98c000a35255a5ffe37ff (diff) | |
download | mupdf-3802ebf92723382070258bcd43771b2f4186c03f.tar.xz |
Add fz_calloc function to check for integer overflow when allocating arrays, and change the signature of fz_realloc to match.
Diffstat (limited to 'draw/imagesmooth.c')
-rw-r--r-- | draw/imagesmooth.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) |