diff options
author | Karl Williamson <khw@cpan.org> | 2015-11-11 12:12:52 -0700 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2015-11-25 15:48:17 -0700 |
commit | 80670d3798d4141aa685fdabe96e2aadc61913de (patch) | |
tree | 44bf04fc28d3553a2a53ff5189e1f0f061c77eb6 /utf8.c | |
parent | 7dfd844657592a17d8df0838751abd0be2c7591b (diff) | |
download | perl-80670d3798d4141aa685fdabe96e2aadc61913de.tar.gz |
Fix uvoffuni_to_utf8_flags() disallowed input
This function has the capability to refuse to accept problematic code
points, such as surrogates. It accepted them anyway if the warnings
category wasn't enabled. Tests for this will be introduced in the next
commit.
Diffstat (limited to 'utf8.c')
-rw-r--r-- | utf8.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -116,8 +116,7 @@ Perl_uvoffuni_to_utf8_flags(pTHX_ U8 *d, UV uv, UV flags) /* The first problematic code point is the first surrogate */ if ( flags /* It's common to turn off all these */ - && uv >= UNICODE_SURROGATE_FIRST - && ckWARN3_d(WARN_SURROGATE, WARN_NON_UNICODE, WARN_NONCHAR)) + && uv >= UNICODE_SURROGATE_FIRST) { if (UNICODE_IS_SURROGATE(uv)) { if (flags & UNICODE_WARN_SURROGATE) { |