diff options
| author | Nikita Popov <nikita.ppv@gmail.com> | 2020-01-29 10:57:44 +0100 |
|---|---|---|
| committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-02-05 11:18:46 +0100 |
| commit | 13bfa9f5ac04a65300cf20211e2e3314e827595d (patch) | |
| tree | 773a2ff524a4f8553a7131fcde7e0b72bc6576c1 /ext/pcre/tests | |
| parent | e3632fdc0d1fded7c88ee7d46cba26af55c3c07b (diff) | |
| download | php-git-13bfa9f5ac04a65300cf20211e2e3314e827595d.tar.gz | |
Fixed bug #79188
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😒😒😒😒😒😒😒😒😒😒" |
