summaryrefslogtreecommitdiff
path: root/fitz/fitz.h
diff options
context:
space:
mode:
authorTor Andersson <tor@ghostscript.com>2011-01-27 22:35:26 +0000
committerTor Andersson <tor@ghostscript.com>2011-01-27 22:35:26 +0000
commit3802ebf92723382070258bcd43771b2f4186c03f (patch)
treecb0ca60a270dd9b73918015ee8e8cd86b1dc0296 /fitz/fitz.h
parent836d6cb3d16e94929be98c000a35255a5ffe37ff (diff)
downloadmupdf-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.h5
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);