com php-src: Fix #75457: heap-use-after-free in php7.0.25: ext/pcre/tests/bug75457.phpt
| From: | Sara Golemon | Date: | Wed, 28 Aug 2019 02:26:21 +0000 |
| Subject: | com php-src: Fix #75457: heap-use-after-free in php7.0.25: ext/pcre/tests/bug75457.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-108098@lists.php.net to get a copy of this message | ||
Commit: 8debe97557a1ca7adf7c564db6a78fb6a82084b5
Author: Christoph M. Becker <cmbecker69@gmx.de> Fri, 16 Aug 2019 14:29:19 +0200
Committer: Sara Golemon <pollita@php.net> Tue, 27 Aug 2019 22:26:21 -0400
Parents: 4d4f71aa8430585775c236cea6c448801e54ad36
Branches: PHP-7.2..22
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=8debe97557a1ca7adf7c564db6a78fb6a82084b5
Log:
Fix #75457: heap-use-after-free in php7.0.25
Backport <https://vcs.pcre.org/pcre?view=revision&revision=1638>.
Bugs:
https://bugs.php.net/75457
Changed paths:
A ext/pcre/tests/bug75457.phpt
Diff:
diff --git a/ext/pcre/tests/bug75457.phpt b/ext/pcre/tests/bug75457.phpt
new file mode 100644
index 0000000..c7ce9ed
--- /dev/null
+++ b/ext/pcre/tests/bug75457.phpt
@@ -0,0 +1,10 @@
+--TEST--
+Bug #75457 (heap-use-after-free in php7.0.25)
+--FILE--
+<?php
+$pattern = "/(((?(?C)0?=))(?!()0|.(?0)0)())/";
+var_dump(preg_match($pattern, "hello"));
+?>
+--EXPECTF--
+Warning: preg_match(): Compilation failed: assertion expected after (?( or (?(?C) at offset 4 in
%sbug75457.php on line %d
+bool(false)