1--TEST--
2iconv_set_encoding() charset parameter length checks (CVE-2007-4840)
3--EXTENSIONS--
4iconv
5--FILE--
6<?php
7$a = str_repeat("/", 9000000);
8var_dump(iconv_set_encoding("input_encoding", $a));
9var_dump(iconv_set_encoding("output_encoding", $a));
10var_dump(iconv_set_encoding("internal_encoding", $a));
11?>
12--EXPECTF--
13Warning: iconv_set_encoding(): Encoding parameter exceeds the maximum allowed length of 64 characters in %s on line %d
14bool(false)
15
16Warning: iconv_set_encoding(): Encoding parameter exceeds the maximum allowed length of 64 characters in %s on line %d
17bool(false)
18
19Warning: iconv_set_encoding(): Encoding parameter exceeds the maximum allowed length of 64 characters in %s on line %d
20bool(false)
21