Skip to content

Commit be6d72b

Browse files
committed
Revert "Fix out-of-bounds write"
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 phpGH-6357.
1 parent 6d2bc72 commit be6d72b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/mbstring/oniguruma/src/regcomp.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -5603,7 +5603,7 @@ concat_opt_exact_str(OptStr* to, UChar* s, UChar* end, OnigEncoding enc)
56035603

56045604
for (i = to->len, p = s; p < end && i < OPT_EXACT_MAXLEN; ) {
56055605
len = enclen(enc, p);
5606-
if (i + len >= OPT_EXACT_MAXLEN) break;
5606+
if (i + len > OPT_EXACT_MAXLEN) break;
56075607
for (j = 0; j < len && p < end; j++)
56085608
to->s[i++] = *p++;
56095609
}

0 commit comments

Comments
 (0)