summaryrefslogtreecommitdiff
path: root/pcretest.c
diff options
context:
space:
mode:
authorph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2016-02-27 17:55:24 +0000
committerph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2016-02-27 17:55:24 +0000
commit0fc2edb79b3815c6511fd75c36a57893e4acaee6 (patch)
tree4618bcc4cb2912fe5b07c1ce14259d45b172ef2f /pcretest.c
parentb7537308b7c758f33c347cb0bec62754c43c271f (diff)
downloadpcre-0fc2edb79b3815c6511fd75c36a57893e4acaee6.tar.gz
Fix pcretest loop for global matching with an ovector size less than 2.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1637 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'pcretest.c')
-rw-r--r--pcretest.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/pcretest.c b/pcretest.c
index 63869fd..78ef517 100644
--- a/pcretest.c
+++ b/pcretest.c
@@ -5617,6 +5617,12 @@ while (!done)
break;
}
+ if (use_size_offsets < 2)
+ {
+ fprintf(outfile, "Cannot do global matching with an ovector size < 2\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
Perl's /g options does. This turns out to be rather cunning. First we set