ppisar pushed to pcre (f20). "Fix computing size for pattern with a negated special calss in on-UCP mode"
notifications at fedoraproject.org
notifications at fedoraproject.org
Fri Apr 10 13:47:06 UTC 2015
>From c4900dc033da8a25c9860a3da60c7feda2bcc98a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar at redhat.com>
Date: Thu, 9 Apr 2015 17:03:57 +0200
Subject: Fix computing size for pattern with a negated special calss in on-UCP
mode
diff --git a/pcre-8.33-Fix-memory-bug-for-S-V-H-compile.patch b/pcre-8.33-Fix-memory-bug-for-S-V-H-compile.patch
new file mode 100644
index 0000000..513dd83
--- /dev/null
+++ b/pcre-8.33-Fix-memory-bug-for-S-V-H-compile.patch
@@ -0,0 +1,68 @@
+From dd2bdc858ff5e92d1bddd7ca54fddcb03aabfb5f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar at redhat.com>
+Date: Thu, 9 Apr 2015 17:02:59 +0200
+Subject: [PATCH] Fix memory bug for [\S\V\H] compile.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This is upstream commit ported to 8.33:
+
+commit ef430ada283aba3ff71d7de496904f4d137280f8
+Author: ph10 <ph10 at 2f5784b3-3f2a-0410-8824-cb99058d5e15>
+Date: Fri Mar 27 16:44:50 2015 +0000
+
+ Fix memory bug for [\S\V\H] compile.
+
+ git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1536 2f5784b3-3f2a-0410-8824-
+cb99058d5e15
+
+Signed-off-by: Petr Písař <ppisar at redhat.com>
+---
+ pcre_compile.c | 6 ++++++
+ testdata/testinput4 | 2 ++
+ testdata/testoutput4 | 2 ++
+ 3 files changed, 10 insertions(+)
+
+diff --git a/pcre_compile.c b/pcre_compile.c
+index 5786a6b..2432437 100644
+--- a/pcre_compile.c
++++ b/pcre_compile.c
+@@ -4686,6 +4686,12 @@ for (;; ptr++)
+ }
+ #endif
+
++ /* Even though any XCLASS list is now discarded, we must allow for
++ its memory. */
++
++ if (lengthptr != NULL)
++ *lengthptr += (int)(class_uchardata - class_uchardata_base);
++
+ /* If there are no characters > 255, or they are all to be included or
+ excluded, set the opcode to OP_CLASS or OP_NCLASS, depending on whether the
+ whole class was negated and whether there were negative specials such as \S
+diff --git a/testdata/testinput4 b/testdata/testinput4
+index b9f1a72..8e9b477 100644
+--- a/testdata/testinput4
++++ b/testdata/testinput4
+@@ -711,4 +711,6 @@
+ \x{100}\x{100}\x{100}\x{100}
+ \x{100}\x{100}\x{100}
+
++"[\S\V\H]"8
++
+ /-- End of testinput4 --/
+diff --git a/testdata/testoutput4 b/testdata/testoutput4
+index 6694111..34cf636 100644
+--- a/testdata/testoutput4
++++ b/testdata/testoutput4
+@@ -1257,4 +1257,6 @@ No match
+ \x{100}\x{100}\x{100}
+ No match
+
++"[\S\V\H]"8
++
+ /-- End of testinput4 --/
+--
+2.1.0
+
diff --git a/pcre.spec b/pcre.spec
index 863a52b..25eb32c 100644
--- a/pcre.spec
+++ b/pcre.spec
@@ -2,7 +2,7 @@
#%%global rcversion RC1
Name: pcre
Version: 8.33
-Release: %{?rcversion:0.}8%{?rcversion:.%rcversion}%{?dist}
+Release: %{?rcversion:0.}9%{?rcversion:.%rcversion}%{?dist}
%global myversion %{version}%{?rcversion:-%rcversion}
Summary: Perl-compatible regular expression library
Group: System Environment/Libraries
@@ -37,6 +37,9 @@ Patch8: pcre-8.35-Fix-bug-when-there-are-unset-groups-prior-to-ACCEPT-.patch
# Fix unused memory usage on zero-repeat assertion condition, bug #1165626,
# CVE-2014-8964, in upstream after 8.36
Patch9: pcre-8.33-Fix-zero-repeat-assertion-condition-bug.patch
+# Fix computing size for pattern with a negated special calss in on-UCP mode,
+# bug #1210383, in upstream after 8.36
+Patch10: pcre-8.33-Fix-memory-bug-for-S-V-H-compile.patch
BuildRequires: readline-devel
# New libtool to get rid of rpath
BuildRequires: autoconf, automake, libtool
@@ -86,6 +89,7 @@ Utilities demonstrating PCRE capabilities like pcregrep or pcretest.
%patch7 -p1 -b .compiler_crash_zero_group
%patch8 -p1 -b .reset_groups
%patch9 -p1 -b .zero_repeat_assertion
+%patch10 -p1 -b .size_special_class
# Because of rpath patch
libtoolize --copy --force && autoreconf -vif
# One contributor's name is non-UTF-8
@@ -149,6 +153,10 @@ make check
%{_mandir}/man1/pcretest.*
%changelog
+* Fri Apr 10 2015 Petr Pisar <ppisar at redhat.com> - 8.33-9
+- Fix computing size for pattern with a negated special calss in on-UCP mode
+ (bug #1210383)
+
* Tue Dec 02 2014 Petr Pisar <ppisar at redhat.com> - 8.33-8
- Fix CVE-2014-8964 (unused memory usage on zero-repeat assertion condition)
(bug #1165626)
--
cgit v0.10.2
http://pkgs.fedoraproject.org/cgit/pcre.git/commit/?h=f20&id=c4900dc033da8a25c9860a3da60c7feda2bcc98a
More information about the scm-commits
mailing list