mirror of
https://github.com/php/php-src.git
synced 2024-12-12 19:33:31 +08:00
22 lines
787 B
PHP
Executable File
22 lines
787 B
PHP
Executable File
--TEST--
|
|
iconv_set_encoding() 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_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(): Charset parameter exceeds the maximum allowed length of %d characters in %s on line %d
|
|
bool(false)
|
|
|
|
Warning: iconv_set_encoding(): Charset parameter exceeds the maximum allowed length of %d characters in %s on line %d
|
|
bool(false)
|
|
|
|
Warning: iconv_set_encoding(): Charset parameter exceeds the maximum allowed length of %d characters in %s on line %d
|
|
bool(false)
|