summaryrefslogtreecommitdiff
path: root/pcreposix.c
diff options
context:
space:
mode:
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;
}