|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
Patchesbad_variable_mbfilter2 (last revision 2014-07-07 14:50 UTC by delda at virgilio dot it)bad_variable_mbfilter (last revision 2014-06-05 13:45 UTC by delda at virgilio dot it) Pull RequestsHistoryAllCommentsChangesGit/SVN commits
[2014-07-05 23:08 UTC] yohgaki@php.net
[2017-07-22 20:07 UTC] nikic@php.net
-Status: Open
+Status: Not a bug
[2017-07-22 20:07 UTC] nikic@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 10:00:01 2025 UTC |
Description: ------------ I think that in the function 'mbfl_identify_encoding2' (in ext/mbstring/libmbfl/mbfl/mbfilter.c), the variable 'bad' was instantiated in a wrong place. The same is in 'mbfl_encoding_detector_feed' and 'mbfl_identify_encoding' Test script: --------------- if (p != NULL) { bad = 0; while (n > 0) { for (i = 0; i < num; i++) { [...] } if ((num - 1) <= bad && !strict) { break; } p++; n--; } } I think that 'bad' variable must be inner the while cycle, otherwise the if control on bad number detect is very poor.