1234567891011121314151617181920 |
- --TEST--
- iconv_set_encoding() charset parameter length checks (CVE-2007-4840)
- --EXTENSIONS--
- iconv
- --FILE--
- <?php
- $a = str_repeat("/", 9000000);
- var_dump(iconv_set_encoding("input_encoding", $a));
- var_dump(iconv_set_encoding("output_encoding", $a));
- var_dump(iconv_set_encoding("internal_encoding", $a));
- ?>
- --EXPECTF--
- Warning: iconv_set_encoding(): Encoding parameter exceeds the maximum allowed length of 64 characters in %s on line %d
- bool(false)
- Warning: iconv_set_encoding(): Encoding parameter exceeds the maximum allowed length of 64 characters in %s on line %d
- bool(false)
- Warning: iconv_set_encoding(): Encoding parameter exceeds the maximum allowed length of 64 characters in %s on line %d
- bool(false)
|