PHP  
 PHP_7_2
downloads | QA | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
 

Test Failure Report for ext/fileinfo/tests/cve-2014-3538.phpt ('Bug #66731: file: extensive backtraking')

Script

1: <?php
2: $fd 
__DIR__.'/cve-2014-3538.data';
3:
4:
file_put_contents($fd,
5:   
'try:' .
6:   
str_repeat("\n"1000000));
7:
8:
$fi finfo_open(FILEINFO_NONE);
9:
$t microtime(true);
10:
var_dump(finfo_file($fi$fd));
11:
$t microtime(true) - $t;
12:
finfo_close($fi);
13: if (
$t 1) {
14:     echo 
"Ok\n";
15: } else {
16:     
printf("Failed, time=%.2f\n"$t);
17: }
18:
19:
?>
20:
Done
21:

Expected

string(%d) "%s"
Ok
Done

Output

string(10) "ASCII text"
Failed, time=2.65
Done

Diff

002+ Failed, time=2.65
002- Ok

 

Generated at Tue, 21 Nov 2017 01:17:01 +0000 (3 days ago)

Copyright © 2005-2017 The PHP Group
All rights reserved.