From c4dd7a1a684490673e25aaf4fabec5df138854c4 Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Thu, 14 Mar 2013 05:42:27 +0000 Subject: Imported from /home/lorry/working-area/delta_php2/php-5.4.13.tar.bz2. --- ext/oci8/tests/null_byte_1.phpt | 46 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 ext/oci8/tests/null_byte_1.phpt (limited to 'ext/oci8/tests/null_byte_1.phpt') diff --git a/ext/oci8/tests/null_byte_1.phpt b/ext/oci8/tests/null_byte_1.phpt new file mode 100644 index 0000000..0869d94 --- /dev/null +++ b/ext/oci8/tests/null_byte_1.phpt @@ -0,0 +1,46 @@ +--TEST-- +Protect against null bytes in LOB filenames +--SKIPIF-- + +--INI-- +display_errors = On +error_reporting = E_WARNING +--FILE-- +savefile("/tmp/abc\0def"); +var_dump($r); + +echo "Test 2: Export\n"; + +$r = $lob->export("/tmp/abc\0def"); +var_dump($r); + +?> +===DONE=== + +--EXPECTF-- +Test 1: Import + +Warning: OCI-Lob::savefile() expects parameter 1 to be a valid path, string given in %snull_byte_1.php on line %d +NULL +Test 2: Export + +Warning: OCI-Lob::export() expects parameter 1 to be a valid path, string given in %snull_byte_1.php on line %d +NULL +===DONE=== -- cgit v1.2.1