summaryrefslogtreecommitdiff
path: root/ext/iconv/tests/iconv_strpos-charset-length-cve-2007-4840.phpt
blob: 0b378cb5030d038cb0e46462c2d2a26f09ca490c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
--TEST--
iconv_strpos() charset parameter length checks (CVE-2007-4840)
--SKIPIF--
<?php extension_loaded('iconv') or die('skip iconv extension is not available'); ?>
--FILE--
<?php
$a = str_repeat("/", 9000000);
var_dump(iconv_strpos("a", "b", 0, $a));
?>
--EXPECTF--
Warning: iconv_strpos(): Charset parameter exceeds the maximum allowed length of %d characters in %s on line %d
bool(false)