Skip to content
This repository was archived by the owner on Apr 24, 2025. It is now read-only.

Commit cbe9f8b

Browse files
committed
#207: Out-of-bounds write
1 parent 278a172 commit cbe9f8b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/regcomp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6257,7 +6257,7 @@ concat_opt_exact_str(OptStr* to, UChar* s, UChar* end, OnigEncoding enc)
62576257

62586258
for (i = to->len, p = s; p < end && i < OPT_EXACT_MAXLEN; ) {
62596259
len = enclen(enc, p);
6260-
if (i + len > OPT_EXACT_MAXLEN) break;
6260+
if (i + len >= OPT_EXACT_MAXLEN) break;
62616261
for (j = 0; j < len && p < end; j++)
62626262
to->s[i++] = *p++;
62636263
}

0 commit comments

Comments
 (0)