File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ $badUTF8 = array(
31
31
// Multi-byte characters which end too soon and go to ASCII
32
32
"\xDFA " => "\x00\x00\x00% \x00\x00\x00A " ,
33
33
"\xEF\xBFA " => "\x00\x00\x00% \x00\x00\x00A " ,
34
+ "\xF0\xBFA " => "\x00\x00\x00% \x00\x00\x00A " ,
34
35
"\xF0\xBF\xBFA " => "\x00\x00\x00% \x00\x00\x00A " ,
35
36
36
37
// Multi-byte characters which end too soon and go to another MB char
Original file line number Diff line number Diff line change @@ -778,13 +778,19 @@ $invalid = array(
778
778
// Multi-byte characters which end too soon and go to ASCII
779
779
"\xDFA " => "\x00\x00\x00% \x00\x00\x00A " ,
780
780
"\xEF\xBFA " => "\x00\x00\x00% \x00\x00\x00A " ,
781
+ "\xF0\xBFA " => "\x00\x00\x00% \x00\x00\x00A " ,
781
782
"\xF0\xBF\xBFA " => "\x00\x00\x00% \x00\x00\x00A " ,
782
783
783
784
// Multi-byte characters which end too soon and go to another MB char
784
785
"\xDF\xDF\xBF" => "\x00\x00\x00% \x00\x00\x07\xFF" ,
785
786
"\xEF\xBF\xDF\xBF" => "\x00\x00\x00% \x00\x00\x07\xFF" ,
786
787
"\xF0\xBF\xBF\xDF\xBF" => "\x00\x00\x00% \x00\x00\x07\xFF" ,
787
788
789
+ // Multi-byte characters which end too soon and go to a junk byte
790
+ // (Which isn't even valid to start a new character)
791
+ "\xF0\xBF\xBF\xFF" => "\x00\x00\x00% " ,
792
+ "\xF0\xBF\xFF" => "\x00\x00\x00% " ,
793
+
788
794
// Continuation bytes which appear outside of a MB char
789
795
"\x80" => "\x00\x00\x00% " ,
790
796
"A \x80" => "\x00\x00\x00A \x00\x00\x00% " ,
You can’t perform that action at this time.
0 commit comments