Skip to content

Commit ccc8d92

Browse files
committed
Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6: Fix bug #72910 5.6.27 will be next
2 parents 1ee4168 + e576714 commit ccc8d92

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)