aboutsummaryrefslogtreecommitdiffstats
path: root/regexec.c
diff options
context:
space:
mode:
Diffstat (limited to 'regexec.c')
-rw-r--r--regexec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/regexec.c b/regexec.c
index 7c8ffa47a9..a0625fdf7e 100644
--- a/regexec.c
+++ b/regexec.c
@@ -2206,7 +2206,8 @@ match_at(regex_t* reg, UChar* str, UChar* end, UChar* sstart,
repeat_inc_ng:
stkp->u.repeat.count++;
- if (stkp->u.repeat.count < reg->repeat_range[mem].upper) {
+ if (stkp->u.repeat.count < reg->repeat_range[mem].upper
+ || reg->repeat_range[mem].upper < 0 /* IS_REPEAT_INFINITE(upper) */) {
if (stkp->u.repeat.count >= reg->repeat_range[mem].lower) {
UChar* pcode = stkp->u.repeat.pcode;