pcre2/pcre2-10.22-Fix-bad-conditional-recursion-test-bug-when-a-group-.patch

44 lines
1.5 KiB
Diff
Raw Normal View History

From 8b294ce0b5269e2e2c110ac502e8c4e8f00dbd75 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
Date: Wed, 19 Oct 2016 13:05:57 +0200
Subject: [PATCH] Fix bad conditional recursion test bug when a group with name
starting "R" exists.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
pcre commit ported to pcre2-10.22:
From a2d87770aebc2ba13d6943ff1fcfae0fc26a3134 Mon Sep 17 00:00:00 2001
From: ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>
Date: Thu, 13 Oct 2016 16:00:48 +0000
Subject: [PATCH] Fix bad conditional recursion test bug when a group with name
starting "R" exists.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1667 2f5784b3-3f2a-0410-8824-cb99058d5e15
Signed-off-by: Petr Písař <ppisar@redhat.com>
---
src/pcre2_compile.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/pcre2_compile.c b/src/pcre2_compile.c
index a92a69a..b3ebb25 100644
--- a/src/pcre2_compile.c
+++ b/src/pcre2_compile.c
@@ -6378,7 +6378,8 @@ for (;; ptr++)
slot = cb->name_table;
for (i = 0; i < cb->names_found; i++)
{
- if (PRIV(strncmp)(name, slot+IMM2_SIZE, namelen) == 0) break;
+ if (PRIV(strncmp)(name, slot+IMM2_SIZE, namelen) == 0 &&
+ slot[IMM2_SIZE+namelen] == 0) break;
slot += cb->name_entry_size;
}
--
2.7.4