Annotation of embedaddon/php/ext/standard/tests/general_functions/dl-cve-2007-4887.phpt, revision 1.1.1.2
1.1 misho 1: --TEST--
2: dl() filename length checks (CVE-2007-4887)
1.1.1.2 ! misho 3: --SKIPIF--
! 4: <?php
! 5: $enabled_sapi = array('cgi-fcgi', 'cli', 'embed', 'fpm');
! 6: if (!in_array(php_sapi_name(), $enabled_sapi)) {
! 7: die('skip dl() is not enabled for ' . php_sapi_name());
! 8: }
! 9: ?>
1.1 misho 10: --INI--
11: enable_dl=1
12: --FILE--
13: <?php
14: var_dump(dl(str_repeat("a", 8376757)));
15: ?>
16: --EXPECTF--
17:
18: Warning: dl(): File name exceeds the maximum allowed length of %d characters in %s on line %d
19: bool(false)
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>