summaryrefslogtreecommitdiff
path: root/ext/hash/tests
diff options
context:
space:
mode:
authorStanislav Malyshev <stas@php.net>2015-04-05 16:01:24 -0700
committerStanislav Malyshev <stas@php.net>2015-04-11 16:53:22 -0700
commit4435b9142ff9813845d5c97ab29a5d637bedb257 (patch)
treea6451ac31e1418813a46f73dfffe805421e5a55e /ext/hash/tests
parent9faaee66fa493372c7340b1ab05f8fd115131a42 (diff)
downloadphp-git-4435b9142ff9813845d5c97ab29a5d637bedb257.tar.gz
Fixed bug #69353 (Missing null byte checks for paths in various PHP extensions)
Diffstat (limited to 'ext/hash/tests')
-rw-r--r--ext/hash/tests/hash_hmac_file_error.phpt7
1 files changed, 7 insertions, 0 deletions
diff --git a/ext/hash/tests/hash_hmac_file_error.phpt b/ext/hash/tests/hash_hmac_file_error.phpt
index 42ab122285..26ba8aacbe 100644
--- a/ext/hash/tests/hash_hmac_file_error.phpt
+++ b/ext/hash/tests/hash_hmac_file_error.phpt
@@ -28,6 +28,9 @@ hash_hmac_file('crc32', $file, $key, TRUE, $extra_arg);
echo "\n-- Testing hash_hmac_file() function with invalid hash algorithm --\n";
hash_hmac_file('foo', $file, $key, TRUE);
+echo "\n-- Testing hash_hmac_file() function with bad path --\n";
+hash_hmac_file('crc32', $file.chr(0).$file, $key, TRUE);
+
?>
===Done===
--EXPECTF--
@@ -51,4 +54,8 @@ Warning: hash_hmac_file() expects at most 4 parameters, 5 given in %s on line %d
-- Testing hash_hmac_file() function with invalid hash algorithm --
Warning: hash_hmac_file(): Unknown hashing algorithm: foo in %s on line %d
+
+-- Testing hash_hmac_file() function with bad path --
+
+Warning: hash_hmac_file(): Invalid path in %s on line %d
===Done=== \ No newline at end of file