summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/pdf/pdf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/pdf/pdf.c b/ext/pdf/pdf.c
index e8e7924d07..2e7dac8a56 100644
--- a/ext/pdf/pdf.c
+++ b/ext/pdf/pdf.c
@@ -1963,7 +1963,7 @@ PHP_FUNCTION(pdf_open_memory_image)
ZEND_FETCH_RESOURCE(im, gdImagePtr, arg2, -1, "Image", le_gd);
count = 3 * im->sx * im->sy;
- buffer = (unsigned char *) emalloc(count);
+ buffer = (unsigned char *) safe_emalloc(3 * im->sx, im->sy, 0);
ptr = buffer;
for(i=0; i<im->sy; i++) {