Skip to content

Commit

Permalink
Fix tests - newer versions check Unicode
Browse files Browse the repository at this point in the history
  • Loading branch information
smalyshev authored and remicollet committed Jan 7, 2019
1 parent 678429c commit f94b81c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
8 changes: 3 additions & 5 deletions ext/mbstring/tests/bug77370.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ Bug #77370 (Buffer overflow on mb regex functions - fetch_token)
<?php
var_dump(mb_split(" \xfd",""));
?>
--EXPECT--
array(1) {
[0]=>
string(0) ""
}
--EXPECTF--
Warning: mb_split(): mbregex compile err: invalid code point value in %sbug77370.php on line %d
bool(false)
5 changes: 3 additions & 2 deletions ext/mbstring/tests/bug77371.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ Bug #77371 (heap buffer overflow in mb regex functions - compile_string_node)
<?php
var_dump(mb_ereg("()0\xfc00000\xfc00000\xfc00000\xfc",""));
?>
--EXPECT--
bool(false)
--EXPECTF--
Warning: mb_ereg(): mbregex compile err: invalid code point value in %sbug77371.php on line %d
bool(false)
11 changes: 9 additions & 2 deletions ext/mbstring/tests/bug77381.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,15 @@ var_dump(mb_ereg("(?i)000000000000000000000\xf0",""));
var_dump(mb_ereg("0000\\"."\xf5","0"));
var_dump(mb_ereg("(?i)FFF00000000000000000\xfd",""));
?>
--EXPECT--
int(1)
--EXPECTF--
Warning: mb_ereg(): mbregex compile err: invalid code point value in %sbug77381.php on line %d
bool(false)

Warning: mb_ereg(): mbregex compile err: invalid code point value in %sbug77381.php on line %d
bool(false)

Warning: mb_ereg(): mbregex compile err: invalid code point value in %sbug77381.php on line %d
bool(false)

Warning: mb_ereg(): mbregex compile err: invalid code point value in %sbug77381.php on line %d
bool(false)

0 comments on commit f94b81c

Please sign in to comment.