summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2017-07-04 12:57:40 -0600
committerKarl Williamson <khw@cpan.org>2017-07-12 21:14:26 -0600
commitcf8a8202801e2546c26b9aedd1337bcad8b2decb (patch)
tree7b23c00ca342a92e8225c8b0e8883e57c526decb /ext
parent3f0559171310ec103fb86919d945272c1d49b308 (diff)
downloadperl-cf8a8202801e2546c26b9aedd1337bcad8b2decb.tar.gz
APItest/t/utf8_warn_base.pl: Add a test
This verifies that we don't mistake an overlong for overflow
Diffstat (limited to 'ext')
-rw-r--r--ext/XS-APItest/t/utf8_warn_base.pl4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/XS-APItest/t/utf8_warn_base.pl b/ext/XS-APItest/t/utf8_warn_base.pl
index 189813dc6f..8d8fb5d29d 100644
--- a/ext/XS-APItest/t/utf8_warn_base.pl
+++ b/ext/XS-APItest/t/utf8_warn_base.pl
@@ -412,6 +412,10 @@ my @tests;
if (! $::is64bit) {
if (isASCII) {
push @tests,
+ [ "overlong malformation, but naively looks like overflow",
+ "\xff\x80\x80\x80\x80\x80\x80\x83\xbf\xbf\xbf\xbf\xbf",
+ 0xFFFFFFFF,
+ ],
[ "overflow that old algorithm failed to detect",
"\xfe\x86\x80\x80\x80\x80\x80",
-1,