diff options
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | pcretest.c | 6 |
2 files changed, 9 insertions, 0 deletions
@@ -16,6 +16,9 @@ Version 8.37 xx-xxx-201x 3. If a pattern in pcretest input had the P (POSIX) modifier followed by an unrecognized modifier, a crash could occur. + +4. An attempt to do global matching in pcretest with a zero-length ovector + caused a crash. @@ -5603,6 +5603,12 @@ while (!done) /* If not /g or /G we are done */ if (!do_g && !do_G) break; + + if (use_offsets == NULL) + { + fprintf(outfile, "Cannot do global matching without an ovector\n"); + break; + } /* If we have matched an empty string, first check to see if we are at the end of the subject. If so, the /g loop is over. Otherwise, mimic what |