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:
+1
-1
@@ -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++) {
|
||||
|
||||
Reference in New Issue
Block a user