Annotation of embedaddon/php/ext/iconv/tests/iconv_strlen-charset-length-cve-2007-4840.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: iconv_strlen() 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("/", 9791999);
                      8: var_dump(iconv_strlen(1, $a));
                      9: ?>
                     10: --EXPECTF--
                     11: 
                     12: Warning: iconv_strlen(): Charset parameter exceeds the maximum allowed length of %d characters in %s on line %d
                     13: bool(false)

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>