diff options
author | Karl Williamson <khw@cpan.org> | 2019-11-08 10:29:05 -0700 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2019-11-08 10:40:18 -0700 |
commit | bd0e76db93fab334167b9594f98cd1c415275b33 (patch) | |
tree | d3dd836f985c4108f5bff2ab4c4c1b17095987a5 /t | |
parent | 8c27d1fc595fedb029c0f0eda7c846fe56b1406d (diff) | |
download | perl-bd0e76db93fab334167b9594f98cd1c415275b33.tar.gz |
PATCH: gh#17227 heap-buffer-overflow
There were two problems this uncovered. One was that a floating point
expression with both operands ints truncated before becoming floating.
One operand needs to be floating.
The second is that the expansion of a non-UTF-8 byte needs to be
considered based on non-UTF-8, rather than its UTF-8 representation.
Diffstat (limited to 't')
-rw-r--r-- | t/op/tr_latin1.t | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/t/op/tr_latin1.t b/t/op/tr_latin1.t index 3cfe6f92a6..9d08652aaf 100644 --- a/t/op/tr_latin1.t +++ b/t/op/tr_latin1.t @@ -7,7 +7,7 @@ BEGIN { set_up_inc('../lib'); } -plan tests => 1; +plan tests => 2; { # This test is malloc senstive. Right now on some platforms anyway, space # for the final \xff needs to be mallocd, and that's what caused the @@ -18,4 +18,9 @@ plan tests => 1; } +{ # gh#17277. This caused errors with valgrind and asan + fresh_perl_is('no warnings qw(void uninitialized); s~~00~-y~Ë0~\x{E00}~', + "", {}, 'gh#17227'); +} + 1; |