diff options
author | Stanislav Malyshev <stas@php.net> | 2016-09-01 23:27:06 -0700 |
---|---|---|
committer | Ferenc Kovacs <tyra3l@gmail.com> | 2016-09-15 09:53:09 +0200 |
commit | 486056b2153f7177cd8a7c78d93968726ee8fa65 (patch) | |
tree | f88b06f46ba2063b68ccd85e9963ef97ee8f538e | |
parent | cb49f418301b58e83dbd869a4b1f222b1a8d7208 (diff) | |
download | php-git-486056b2153f7177cd8a7c78d93968726ee8fa65.tar.gz |
Fix bug #72910
Merge upstream patch from https://github.com/kkos/oniguruma/commit/65bdf2a0d160d06556415e5f396a75f6b11bad5c
-rw-r--r-- | ext/mbstring/oniguruma/enc/utf8.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/mbstring/oniguruma/enc/utf8.c b/ext/mbstring/oniguruma/enc/utf8.c index 5e2c1721aa..74122e14bf 100644 --- a/ext/mbstring/oniguruma/enc/utf8.c +++ b/ext/mbstring/oniguruma/enc/utf8.c @@ -98,7 +98,7 @@ mbc_to_code(const UChar* p, const UChar* end ARG_UNUSED) len = enclen(ONIG_ENCODING_UTF8, p); c = *p++; - if (len > 1) { + if (len > 1 && p < end) { len--; n = c & ((1 << (6 - len)) - 1); while (len--) { |