mirror of
https://github.com/php/php-src.git
synced 2025-01-13 06:24:18 +08:00
MFB
This commit is contained in:
parent
1ad9bd68ff
commit
4b343a0562
@ -2465,6 +2465,10 @@ PHP_FUNCTION(array_pad)
|
||||
|
||||
/* Populate the pads array */
|
||||
num_pads = pad_size_abs - input_size;
|
||||
if(num_pads > 1048576) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "You may only pad up to 1048576 elements at a time");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
pads = (zval ***)emalloc(num_pads * sizeof(zval **));
|
||||
for (i = 0; i < num_pads; i++) {
|
||||
pads[i] = pad_value;
|
||||
|
Loading…
Reference in New Issue
Block a user