1
0
mirror of https://github.com/php/php-src.git synced 2026-04-24 08:28:26 +02:00

Memory allocation check.

This commit is contained in:
Ilia Alshanetsky
2004-02-28 21:00:16 +00:00
parent a1fb66d296
commit deeb7dd039
+1 -1
View File
@@ -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++) {