summaryrefslogtreecommitdiff
path: root/ext/pcre/pcrelib/pcre_compile.c
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2017-09-28 15:40:49 +0200
committerAnatol Belski <ab@php.net>2017-09-28 15:40:49 +0200
commitd11fceab151cd0410645f81eb7444af4388470c3 (patch)
tree57e8b30094b157f806b2a44a43e79cdd09904102 /ext/pcre/pcrelib/pcre_compile.c
parent29e673f8ede348eac6bc4e23c91c37240f480f4d (diff)
downloadphp-git-d11fceab151cd0410645f81eb7444af4388470c3.tar.gz
Apply upstream patch for CVE-2016-1283
Fix bug #75207, see also https://bugzilla.redhat.com/show_bug.cgi?id=1295385 https://vcs.pcre.org/pcre?view=revision&revision=1636
Diffstat (limited to 'ext/pcre/pcrelib/pcre_compile.c')
-rw-r--r--ext/pcre/pcrelib/pcre_compile.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/pcre/pcrelib/pcre_compile.c b/ext/pcre/pcrelib/pcre_compile.c
index 11a9d26ff6..c7827745c8 100644
--- a/ext/pcre/pcrelib/pcre_compile.c
+++ b/ext/pcre/pcrelib/pcre_compile.c
@@ -7272,7 +7272,12 @@ for (;; ptr++)
so far in order to get the number. If the name is not found, leave
the value of recno as 0 for a forward reference. */
- else
+ /* This patch (removing "else") fixes a problem when a reference is
+ to multiple identically named nested groups from within the nest.
+ Once again, it is not the "proper" fix, and it results in an
+ over-allocation of memory. */
+
+ /* else */
{
ng = cd->named_groups;
for (i = 0; i < cd->names_found; i++, ng++)