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 /fitz/stm_buffer.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 'fitz/stm_buffer.c')
-rw-r--r-- | fitz/stm_buffer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fitz/stm_buffer.c b/fitz/stm_buffer.c index 00530071..9b1ee469 100644 --- a/fitz/stm_buffer.c +++ b/fitz/stm_buffer.c @@ -36,7 +36,7 @@ fz_dropbuffer(fz_buffer *buf) void fz_resizebuffer(fz_buffer *buf, int size) { - buf->data = fz_realloc(buf->data, size); + buf->data = fz_realloc(buf->data, size, 1); buf->cap = size; if (buf->len > buf->cap) buf->len = buf->cap; |