Skip to content

Commit 01f4a52

Browse files
committed
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0: Fix bug #72910 5.6.27 will be next
2 parents 2adc335 + ccc8d92 commit 01f4a52

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)