summaryrefslogtreecommitdiff
path: root/ext/iconv/tests/iconv_strrpos-charset-length-cve-2007-4840.phpt
blob: 948cc67c77fa5b9cf3c41fd12d7c12ecc9933edf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
--TEST--
iconv_strrpos() 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_strrpos("a", "b", $a));
?>
--EXPECTF--

Warning: iconv_strrpos(): Charset parameter exceeds the maximum allowed length of %d characters in %s on line %d
bool(false)