mirror of
https://github.com/php/php-src.git
synced 2024-09-30 06:16:08 +00:00
471540d285
The test used rand(32, 127) to select the character, however chr(127) results in "data" instead of the expected result, so this test would fail in something like 1% of the runs. Replace rand() with fixed character "a".
27 lines
524 B
PHP
27 lines
524 B
PHP
--TEST--
|
|
Bug #68819 Fileinfo on specific file causes spurious OOM and/or segfault, var 2
|
|
--SKIPIF--
|
|
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
|
|
--FILE--
|
|
<?php
|
|
|
|
$string = '';
|
|
|
|
// These two in any order
|
|
$string .= "\r\n";
|
|
$string .= "''''";
|
|
|
|
// Total string length > 8192
|
|
$string .= str_repeat("a", 8184);
|
|
|
|
// Ending in this string
|
|
$string .= "say";
|
|
|
|
$finfo = new finfo();
|
|
$type = $finfo->buffer($string);
|
|
var_dump($type);
|
|
|
|
?>
|
|
--EXPECT--
|
|
string(60) "ASCII text, with very long lines, with CRLF line terminators"
|