This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
utf8n_to_uvuni(): Fix broken malformation interactions
authorKarl Williamson <public@khwilliamson.com>
Fri, 27 Apr 2012 17:09:14 +0000 (11:09 -0600)
committerRicardo Signes <rjbs@cpan.org>
Tue, 1 May 2012 23:08:57 +0000 (19:08 -0400)
commit2f8f112e03b73a49c60674d3b5e00b4463f1d5b7
treeabb87cf258b6151db2e57d7147562ab893ea0372
parent1530a57dfaff29c214be6c42259309d263abc973
utf8n_to_uvuni(): Fix broken malformation interactions

All code points whose UTF-8 representations start with a byte containing
either \xFE or \xFF are considered problematic because they are not
portable.  There are many such code points that are too large to
represent on a 32 or even a 64 bit platform.  Commit
eb83ed87110e41de6a4cd4463f75df60798a9243 failed to properly catch
overflow when the input flags to this function say to warn on, but
otherwise accept FE and FF sequences.  Now overflow is checked for
unconditionally.
ext/XS-APItest/t/utf8.t
utf8.c