summaryrefslogtreecommitdiff
path: root/pcretest.c
diff options
context:
space:
mode:
authorph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2013-02-13 17:36:38 +0000
committerph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2013-02-13 17:36:38 +0000
commit2daca9b1036d86eeddcfdefd8672da42257a9540 (patch)
tree4a85cff3c6ca9caa03d9e80cdfb0f028723a08ec /pcretest.c
parent3fe1df6131224adfbec7506c2f7041127a58274e (diff)
downloadpcre-2daca9b1036d86eeddcfdefd8672da42257a9540.tar.gz
Fix various save/revert cases for capture_last in recursion and also don't
diagnose overflow when it has reverted. git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1248 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'pcretest.c')
-rw-r--r--pcretest.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/pcretest.c b/pcretest.c
index 0b6c821..fcf1c25 100644
--- a/pcretest.c
+++ b/pcretest.c
@@ -5029,7 +5029,8 @@ while (!done)
if (count == 0)
{
fprintf(outfile, "Matched, but too many substrings\n");
- count = use_size_offsets/3;
+ /* 2 is a special case; match can be returned */
+ count = (use_size_offsets == 2)? 1 : use_size_offsets/3;
}
}
@@ -5043,7 +5044,8 @@ while (!done)
#if !defined NODFA
if (all_use_dfa || use_dfa) maxcount = use_size_offsets/2; else
#endif
- maxcount = use_size_offsets/3;
+ /* 2 is a special case; match can be returned */
+ maxcount = (use_size_offsets == 2)? 1 : use_size_offsets/3;
/* This is a check against a lunatic return value. */