This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Make utf8_to_uvchr() safer
authorKarl Williamson <khw@cpan.org>
Tue, 17 Jul 2018 19:57:54 +0000 (13:57 -0600)
committerKarl Williamson <khw@cpan.org>
Tue, 17 Jul 2018 20:11:51 +0000 (14:11 -0600)
commitaa3c16bd709ef9b9c8c785af48f368e08f70c74b
treecfd770ae37a97b0b3a9ba4bc9a2685e5cbb44f49
parent69352d88af71728e6c8538f66892224127e2167f
Make utf8_to_uvchr() safer

This function is deprecated because the API doesn't allow it to
determine the end of the input string, so it can read off the far end.
But I just realized that since many strings are NUL-terminated, so we
can forbid it from reading past the next NUL, and hence make it safe in
many cases.
utf8.c