com php-src: Sync fix for bug #72910 with current upstream: ext/mbstring/oniguruma/enc/utf8.c

From: Date: Thu, 15 Sep 2016 07:55:26 +0000
Subject: com php-src: Sync fix for bug #72910 with current upstream: ext/mbstring/oniguruma/enc/utf8.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-94552@lists.php.net to get a copy of this message
Commit: b570c506815212c7702bfb0046e87d541e171eb7 Author: Stanislav Malyshev <stas@php.net> Sun, 4 Sep 2016 19:13:22 -0700 Committer: Ferenc Kovacs <tyra3l@gmail.com> Thu, 15 Sep 2016 09:55:26 +0200 Parents: 1d978b7899f460207826fd9d9707604d69cd1f11 Branches: PHP-5.6.26 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=b570c506815212c7702bfb0046e87d541e171eb7 Log: Sync fix for bug #72910 with current upstream Bugs: https://bugs.php.net/72910 Changed paths: M ext/mbstring/oniguruma/enc/utf8.c Diff: diff --git a/ext/mbstring/oniguruma/enc/utf8.c b/ext/mbstring/oniguruma/enc/utf8.c index 74122e1..9e8478f 100644 --- a/ext/mbstring/oniguruma/enc/utf8.c +++ b/ext/mbstring/oniguruma/enc/utf8.c @@ -91,14 +91,16 @@ is_mbc_newline(const UChar* p, const UChar* end) } static OnigCodePoint -mbc_to_code(const UChar* p, const UChar* end ARG_UNUSED) +mbc_to_code(const UChar* p, const UChar* end) { int c, len; OnigCodePoint n; - len = enclen(ONIG_ENCODING_UTF8, p); + len = mbc_enc_len(p); + if (len > end - p) len = end - p; + c = *p++; - if (len > 1 && p < end) { + if (len > 1) { len--; n = c & ((1 << (6 - len)) - 1); while (len--) {

« previous php.cvs (#94552) next »