Skip to content

Commit e576714

Browse files
committed
Fix bug #72910
Merge upstream patch from kkos/oniguruma@65bdf2a
1 parent fbb81dd commit e576714

File tree

1 file changed

+1
-1
lines changed
  • ext/mbstring/oniguruma/enc

1 file changed

+1
-1
lines changed

ext/mbstring/oniguruma/enc/utf8.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ mbc_to_code(const UChar* p, const UChar* end ARG_UNUSED)
9898

9999
len = enclen(ONIG_ENCODING_UTF8, p);
100100
c = *p++;
101-
if (len > 1) {
101+
if (len > 1 && p < end) {
102102
len--;
103103
n = c & ((1 << (6 - len)) - 1);
104104
while (len--) {

0 commit comments

Comments
 (0)