2c2333d
From 108377b836fc29a84f5286287629d96549b1c777 Mon Sep 17 00:00:00 2001
2c2333d
From: ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>
2c2333d
Date: Sun, 29 Nov 2015 17:38:25 +0000
2c2333d
Subject: [PATCH 3/5] Give error for regexec with pmatch=NULL and REG_STARTEND
2c2333d
 set.
2c2333d
MIME-Version: 1.0
2c2333d
Content-Type: text/plain; charset=UTF-8
2c2333d
Content-Transfer-Encoding: 8bit
2c2333d
2c2333d
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1614 2f5784b3-3f2a-0410-8824-cb99058d5e15
2c2333d
2c2333d
Petr Písař: Ported to 8.38.
2c2333d
2c2333d
diff --git a/pcreposix.c b/pcreposix.c
2c2333d
index f024423..dcc13ef 100644
2c2333d
--- a/pcreposix.c
2c2333d
+++ b/pcreposix.c
2c2333d
@@ -364,6 +364,7 @@ start location rather than being passed as a PCRE "starting offset". */
2c2333d
 
2c2333d
 if ((eflags & REG_STARTEND) != 0)
2c2333d
   {
2c2333d
+  if (pmatch == NULL) return REG_INVARG; 
2c2333d
   so = pmatch[0].rm_so;
2c2333d
   eo = pmatch[0].rm_eo;
2c2333d
   }
2c2333d
-- 
2c2333d
2.4.3
2c2333d