We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d1c0cc7 commit 7e8039eCopy full SHA for 7e8039e
TODO_SEGFAULTS
@@ -8,11 +8,10 @@ Fixed:
8
socket_iovec_alloc (Rasmus)
9
exif_imagetype,exif_thumbnail (Rasmus)
10
dbase_open (Rasmus)
11
-
+ array_pad (Rasmus)
12
13
Open:
14
15
- array_pad
16
bcsub (1)
17
mb_ereg (2)
18
mb_ereg_match (2)
ext/standard/array.c
@@ -2339,6 +2339,10 @@ PHP_FUNCTION(array_pad)
2339
2340
/* Populate the pads array */
2341
num_pads = pad_size_abs - input_size;
2342
+ if(num_pads > 1048576) {
2343
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "You may only pad up to 1048576 elements at a time");
2344
+ RETURN_FALSE;
2345
+ }
2346
pads = (zval ***)emalloc(num_pads * sizeof(zval **));
2347
for (i = 0; i < num_pads; i++)
2348
pads[i] = pad_value;
0 commit comments