Skip to content

Commit

Permalink
#207: Out-of-bounds write
Browse files Browse the repository at this point in the history
  • Loading branch information
kkos committed Sep 21, 2020
1 parent 278a172 commit cbe9f8b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/regcomp.c
Original file line number Diff line number Diff line change
Expand Up @@ -6257,7 +6257,7 @@ concat_opt_exact_str(OptStr* to, UChar* s, UChar* end, OnigEncoding enc)

for (i = to->len, p = s; p < end && i < OPT_EXACT_MAXLEN; ) {
len = enclen(enc, p);
if (i + len > OPT_EXACT_MAXLEN) break;
if (i + len >= OPT_EXACT_MAXLEN) break;
for (j = 0; j < len && p < end; j++)
to->s[i++] = *p++;
}
Expand Down

0 comments on commit cbe9f8b

Please sign in to comment.