mirror of
https://github.com/php/php-src.git
synced 2026-04-27 10:16:41 +02:00
48d5ae98e7
* Pull zend_string* from INI directive * Ensure that mail.force_extra_parameters INI directive does not have any nul bytes * ext/standard: Make php_escape_shell_cmd() take a zend_string* instead of char* This saves on an expensive strlen() computation * Convert E_ERROR to ValueError in php_escape_shell_cmd() * ext/standard: Make php_escape_shell_arg() take a zend_string* instead of char* This saves on an expensive strlen() computation * Convert E_ERROR to ValueError in php_escape_shell_arg()
19 lines
352 B
PHP
19 lines
352 B
PHP
--TEST--
|
|
Test escapeshellcmd() allowed argument length
|
|
--FILE--
|
|
<?php
|
|
ini_set('memory_limit', -1);
|
|
$var_2 = str_repeat('A', 1024*1024*64);
|
|
|
|
try {
|
|
escapeshellcmd($var_2);
|
|
} catch (Throwable $e) {
|
|
echo $e::class, ': ', $e->getMessage(), PHP_EOL;
|
|
}
|
|
|
|
?>
|
|
===DONE===
|
|
--EXPECTF--
|
|
ValueError: Command exceeds the allowed length of %d bytes
|
|
===DONE===
|