File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / standard / tests / general_functions / dl-cve-2007-4887.phpt
Revision 1.1.1.2 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Mon Oct 14 08:02:40 2013 UTC (10 years, 8 months ago) by misho
Branches: php, MAIN
CVS tags: v5_4_29p0, v5_4_29, v5_4_20p0, v5_4_20, HEAD
v 5.4.20

--TEST--
dl() filename length checks (CVE-2007-4887)
--SKIPIF--
<?php
$enabled_sapi = array('cgi-fcgi', 'cli', 'embed', 'fpm');
if (!in_array(php_sapi_name(), $enabled_sapi)) {
	die('skip dl() is not enabled for ' . php_sapi_name());
}
?>
--INI--
enable_dl=1
--FILE--
<?php
var_dump(dl(str_repeat("a", 8376757)));
?>
--EXPECTF--	

Warning: dl(): File name exceeds the maximum allowed length of %d characters in %s on line %d
bool(false)

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>