chiark / gitweb /
Add .gitignore for upstream files
[pcre3.git] / pcreposix.c
index 5736c65e3a8686abf6b44e2be61194ab1ea8e9c4..cf75588c40d7984d9b622faa393ba49c760bacb6 100644 (file)
@@ -365,6 +365,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;
   }