com php-src: add tests: ext/standard/tests/general_functions/ escapeshellarg_bug71039.phpt ext/standard/tests
/general_functions/escapeshellarg_bug71270.phpt ext/standard/tests/general_functions/escapeshellcmd_bug 71039.phpt
ext/standard/tests/general_functions /escapeshellcmd_bug71270.phpt

From: Date: Thu, 28 Jan 2016 12:27:26 +0000
Subject: com php-src: add tests: ext/standard/tests/general_functions/ escapeshellarg_bug71039.phpt ext/standard/tests
/general_functions/escapeshellarg_bug71270.phpt ext/standard/tests/general_functions/escapeshellcmd_bug 71039.phpt
ext/standard/tests/general_functions /escapeshellcmd_bug71270.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-90859@lists.php.net to get a copy of this message
Commit: 828364e59ca08c2ff3328a648522f9eb05ebbaa3 Author: Anatol Belski <ab@php.net> Thu, 28 Jan 2016 13:27:26 +0100 Parents: 54c210d2ea9b8539edcde1888b1104b96b38e886 Branches: PHP-5.5 PHP-5.5.32 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=828364e59ca08c2ff3328a648522f9eb05ebbaa3 Log: add tests Changed paths: A ext/standard/tests/general_functions/escapeshellarg_bug71039.phpt A ext/standard/tests/general_functions/escapeshellarg_bug71270.phpt A ext/standard/tests/general_functions/escapeshellcmd_bug71039.phpt A ext/standard/tests/general_functions/escapeshellcmd_bug71270.phpt Diff: diff --git a/ext/standard/tests/general_functions/escapeshellarg_bug71039.phpt b/ext/standard/tests/general_functions/escapeshellarg_bug71039.phpt new file mode 100644 index 0000000..cbb3f6f --- /dev/null +++ b/ext/standard/tests/general_functions/escapeshellarg_bug71039.phpt @@ -0,0 +1,10 @@ +--TEST-- +Test escapeshellarg() string with \0 bytes +--FILE-- +<?php +escapeshellarg("hello\0world"); + +?> +===DONE=== +--EXPECTF-- +Fatal error: escapeshellarg(): Input string contains NULL bytes in %s on line %d diff --git a/ext/standard/tests/general_functions/escapeshellarg_bug71270.phpt b/ext/standard/tests/general_functions/escapeshellarg_bug71270.phpt new file mode 100644 index 0000000..c57da36 --- /dev/null +++ b/ext/standard/tests/general_functions/escapeshellarg_bug71270.phpt @@ -0,0 +1,12 @@ +--TEST-- +Test escapeshellarg() allowed argument length +--FILE-- +<?php +ini_set('memory_limit', -1); +$var_2 = str_repeat('A', 1024*1024*64); +escapeshellarg($var_2); + +?> +===DONE=== +--EXPECTF-- +Fatal error: escapeshellarg(): Argument exceeds the allowed length of %d bytes in %s on line %d diff --git a/ext/standard/tests/general_functions/escapeshellcmd_bug71039.phpt b/ext/standard/tests/general_functions/escapeshellcmd_bug71039.phpt new file mode 100644 index 0000000..0a4d7ea --- /dev/null +++ b/ext/standard/tests/general_functions/escapeshellcmd_bug71039.phpt @@ -0,0 +1,10 @@ +--TEST-- +Test escapeshellcmd() string with \0 bytes +--FILE-- +<?php +escapeshellcmd("hello\0world"); + +?> +===DONE=== +--EXPECTF-- +Fatal error: escapeshellcmd(): Input string contains NULL bytes in %s on line %d diff --git a/ext/standard/tests/general_functions/escapeshellcmd_bug71270.phpt b/ext/standard/tests/general_functions/escapeshellcmd_bug71270.phpt new file mode 100644 index 0000000..4686193 --- /dev/null +++ b/ext/standard/tests/general_functions/escapeshellcmd_bug71270.phpt @@ -0,0 +1,12 @@ +--TEST-- +Test escapeshellcmd() allowed argument length +--FILE-- +<?php +ini_set('memory_limit', -1); +$var_2 = str_repeat('A', 1024*1024*64); +escapeshellcmd($var_2); + +?> +===DONE=== +--EXPECTF-- +Fatal error: escapeshellcmd(): Command exceeds the allowed length of %d bytes in %s on line %d

« previous php.cvs (#90859) next »