1--TEST--
2iconv() charset parameter length checks (CVE-2007-4840)
3--SKIPIF--
4<?php extension_loaded('iconv') or die('skip iconv extension is not available'); ?>
5--FILE--
6<?php
7$a = str_repeat("/", 9000000);
8var_dump(iconv($a, "b", "test"));
9var_dump(iconv("x", $a, "test"));
10?>
11--EXPECTF--
12
13Warning: iconv(): Charset parameter exceeds the maximum allowed length of %d characters in %s on line %d
14bool(false)
15
16Warning: iconv(): Charset parameter exceeds the maximum allowed length of %d characters in %s on line %d
17bool(false)
18