diff options
Diffstat (limited to 'ext/pcre/tests')
| -rw-r--r-- | ext/pcre/tests/bug79188.phpt | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/ext/pcre/tests/bug79188.phpt b/ext/pcre/tests/bug79188.phpt new file mode 100644 index 0000000000..875aad7b98 --- /dev/null +++ b/ext/pcre/tests/bug79188.phpt @@ -0,0 +1,13 @@ +--TEST-- +Bug #79188: Memory corruption in preg_replace/preg_replace_callback and unicode +--FILE-- +<?php + +var_dump(preg_replace("//u", "", "a" . str_repeat("\u{1f612}", 10))); +var_dump(preg_replace_callback( + "//u", function() { return ""; }, "a" . str_repeat("\u{1f612}", 10))); + +?> +--EXPECT-- +string(41) "a😒😒😒😒😒😒😒😒😒😒" +string(41) "a😒😒😒😒😒😒😒😒😒😒" |
