summaryrefslogtreecommitdiff
path: root/pcreposix.c
diff options
context:
space:
mode:
authorph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2015-11-29 17:38:25 +0000
committerph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2015-11-29 17:38:25 +0000
commit108377b836fc29a84f5286287629d96549b1c777 (patch)
tree2edc0d6b73f692242dde327e17af9da0ad3f34f4 /pcreposix.c
parentbfc1dfa660c24dc7a75108d934290e50d7db2719 (diff)
downloadpcre-108377b836fc29a84f5286287629d96549b1c777.tar.gz
Give error for regexec with pmatch=NULL and REG_STARTEND set.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1614 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'pcreposix.c')
-rw-r--r--pcreposix.c1
1 files changed, 1 insertions, 0 deletions
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;
}