Fix crash in regexec() if REG_STARTEND option is set and pmatch argument is NULL
This commit is contained in:
parent
32c1bddd87
commit
86f61cc413
@ -0,0 +1,28 @@
|
|||||||
|
From 108377b836fc29a84f5286287629d96549b1c777 Mon Sep 17 00:00:00 2001
|
||||||
|
From: ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>
|
||||||
|
Date: Sun, 29 Nov 2015 17:38:25 +0000
|
||||||
|
Subject: [PATCH 3/5] Give error for regexec with pmatch=NULL and REG_STARTEND
|
||||||
|
set.
|
||||||
|
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@1614 2f5784b3-3f2a-0410-8824-cb99058d5e15
|
||||||
|
|
||||||
|
Petr Písař: Ported to 8.38.
|
||||||
|
|
||||||
|
diff --git a/pcreposix.c b/pcreposix.c
|
||||||
|
index f024423..dcc13ef 100644
|
||||||
|
--- a/pcreposix.c
|
||||||
|
+++ b/pcreposix.c
|
||||||
|
@@ -364,6 +364,7 @@ start location rather than being passed as a PCRE "starting offset". */
|
||||||
|
|
||||||
|
if ((eflags & REG_STARTEND) != 0)
|
||||||
|
{
|
||||||
|
+ if (pmatch == NULL) return REG_INVARG;
|
||||||
|
so = pmatch[0].rm_so;
|
||||||
|
eo = pmatch[0].rm_eo;
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.4.3
|
||||||
|
|
@ -41,6 +41,9 @@ Patch3: pcre-8.38-Fix-negated-POSIX-class-within-negated-overall-class.patch
|
|||||||
# qualifier with auto-callouts, upstream bug #1724,
|
# qualifier with auto-callouts, upstream bug #1724,
|
||||||
# fixed in upstream after 8.38
|
# fixed in upstream after 8.38
|
||||||
Patch4: pcre-8.38-Fix-bug-for-isolated-E-between-an-item-and-its-quali.patch
|
Patch4: pcre-8.38-Fix-bug-for-isolated-E-between-an-item-and-its-quali.patch
|
||||||
|
# Fix crash in regexec() if REG_STARTEND option is set and pmatch argument is
|
||||||
|
# NULL, upstream bug #1727, fixed in upstream after 8.38
|
||||||
|
Patch5: pcre-8.38-Give-error-for-regexec-with-pmatch-NULL-and-REG_STAR.patch
|
||||||
BuildRequires: readline-devel
|
BuildRequires: readline-devel
|
||||||
BuildRequires: autoconf
|
BuildRequires: autoconf
|
||||||
BuildRequires: automake
|
BuildRequires: automake
|
||||||
@ -94,6 +97,7 @@ Utilities demonstrating PCRE capabilities like pcregrep or pcretest.
|
|||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
%patch3 -p1
|
%patch3 -p1
|
||||||
%patch4 -p1
|
%patch4 -p1
|
||||||
|
%patch5 -p1
|
||||||
# Because of rpath patch
|
# Because of rpath patch
|
||||||
libtoolize --copy --force
|
libtoolize --copy --force
|
||||||
autoreconf -vif
|
autoreconf -vif
|
||||||
@ -170,6 +174,8 @@ make %{?_smp_mflags} check VERBOSE=yes
|
|||||||
(upstream bug #1732)
|
(upstream bug #1732)
|
||||||
- Fix compiling expressions with an isolated \E between an item and its
|
- Fix compiling expressions with an isolated \E between an item and its
|
||||||
qualifier with auto-callouts (upstream bug #1724)
|
qualifier with auto-callouts (upstream bug #1724)
|
||||||
|
- Fix crash in regexec() if REG_STARTEND option is set and pmatch argument is
|
||||||
|
NULL (upstream bug #1727)
|
||||||
|
|
||||||
* Fri Nov 27 2015 Petr Pisar <ppisar@redhat.com> - 8.38-2
|
* Fri Nov 27 2015 Petr Pisar <ppisar@redhat.com> - 8.38-2
|
||||||
- Fix compiling comments with auto-callouts
|
- Fix compiling comments with auto-callouts
|
||||||
|
Loading…
Reference in New Issue
Block a user