Skip to content

Commit

Permalink
Revert "Fix out-of-bounds write"
Browse files Browse the repository at this point in the history
This reverts commit bf6873a.

CVE-2020-26159 is bogus; the "bug" was apparently a false positive
reported by Coverity, and the "fix" apparently wrong, see
<kkos/oniguruma#221>.

Closes GH-6357.
  • Loading branch information
cmb69 committed Oct 26, 2020
1 parent 6d2bc72 commit be6d72b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ext/mbstring/oniguruma/src/regcomp.c
Original file line number Diff line number Diff line change
Expand Up @@ -5603,7 +5603,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 be6d72b

Please sign in to comment.