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/fitz.h | |
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/fitz.h')
-rw-r--r-- | fitz/fitz.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fitz/fitz.h b/fitz/fitz.h index 64a0cd36..fcedbebe 100644 --- a/fitz/fitz.h +++ b/fitz/fitz.h @@ -133,8 +133,9 @@ void fz_catchimpx(fz_error cause, char *fmt, ...) __printflike(2, 3); #define CLAMP(x,a,b) ( (x) > (b) ? (b) : ( (x) < (a) ? (a) : (x) ) ) /* memory allocation */ -void *fz_malloc(int n); -void *fz_realloc(void *p, int n); +void *fz_malloc(int size); +void *fz_calloc(int count, int size); +void *fz_realloc(void *p, int count, int size); void fz_free(void *p); char *fz_strdup(char *s); |