This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
utf8n_to_uvchr(): Properly handle extremely high code points
authorKarl Williamson <khw@cpan.org>
Sat, 8 Jul 2017 20:54:28 +0000 (14:54 -0600)
committerKarl Williamson <khw@cpan.org>
Thu, 13 Jul 2017 03:14:26 +0000 (21:14 -0600)
commit08e73697e67f540b8a9dfcb30133d7176534e3c5
tree52f8744fd67b6beafaf6e957998bdeeb9da26e50
parent6af459e6161c58fe108a33cf114431c9f521758a
utf8n_to_uvchr(): Properly handle extremely high code points

It turns out that it could incorrectly deem something to be overflowing
or overlong.  This fixes that and changes the test to catch this
possibility.  This fixes a bug, so now on 32-bit systems, it detects
that if you have a start byte of FE, you need  a continuation byte to
determine if the result overflows.
ext/XS-APItest/t/utf8_warn_base.pl
t/op/utf8decode.t
utf8.c