perl/t/uni/upper.t
Karl Williamson 56e36cbf2f PATCH: [perl #133876] Write out of bounds
This was caused by a lapse on my part about the inputs to this function
that grows memory.  I was thinking the trailing NUL was included, but
it's not.  This patch adds space for that to all calls of
sv_utf8_upgrade_flags_grow() in the file.

But it occurs to me that maybe the function itself should just add one
instead of having the caller do it.  If you think so, let me know.
2019-03-08 10:18:56 -07:00

21 lines
661 B
Perl

BEGIN {
chdir 't' if -d 't';
unless (defined &DynaLoader::boot_DynaLoader) {
print("1..0 # miniperl: no Unicode::Normalize");
exit(0);
}
require "./uni/case.pl";
}
use feature 'unicode_strings';
is(uc("\x{3B1}\x{345}\x{301}"), "\x{391}\x{301}\x{399}",
'Verify moves YPOGEGRAMMENI');
fresh_perl_is('use 5.026;m.\U00ÿÿ0000.', "", {}, "[perl #133876] This caused valgrind and asan errors");
casetest( 2, # extra tests already run
"Uppercase_Mapping",
uc => sub { uc $_[0] },
uc_with_appended_null_arg => sub { my $a = ""; uc ($_[0] . $a) }
);