This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Convert some calls to test for malformations
authorKarl Williamson <khw@cpan.org>
Fri, 16 Dec 2016 03:11:00 +0000 (20:11 -0700)
committerKarl Williamson <khw@cpan.org>
Sat, 24 Dec 2016 05:36:34 +0000 (22:36 -0700)
commit042d9e5039128be63013ec1b4e120e4b3cebc48c
treee98680cb6b42de54f7d0216a3338175559b99e1c
parentfa8ab37438503dde8c6e781d0d56daf54a633f6b
Convert some calls to test for malformations

Code review showed several places in core where a UTF-8 sequence that
was for a code point below 256 could be malformed, and be blindly
accepted.  Convert these to use the similar macro that does the check.

One place in regexec.c was not converted because it is working on the
pattern, which perl should have generated itself, so very unlikely to be
bemalformed.

I didn't add tests for these, as it would be a pain to figure out
somehow to trigger them, and this is precautionary, based on code
reading rather than any known field experience.
locale.c
pp.c
regexec.c
utf8.c