File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -366,4 +366,31 @@ TODO: {
366366 );
367367}
368368
369+ TODO: {
370+ todo_skip 2 if is_miniperl();
371+ local $: :TODO = ' GH 22192' ;
372+ fresh_perl_is(
373+ <<~'HERE' ,
374+ use Scalar::Util qw(tainted);
375+ my $y = <STDIN>;
376+ vec( my $x = "", 0, 8 ) = $y;
377+ print tainted($x);
378+ HERE
379+ ' 1' ,
380+ { stdin => ' 123' , switches => [ ' -t' ] },
381+ ' lvalue vec() propagates tainting on empty string; GH 22192'
382+ );
383+ fresh_perl_is(
384+ <<~'HERE' ,
385+ use Scalar::Util qw(tainted);
386+ my $y = <STDIN>;
387+ vec( my $x = "X", 0, 8 ) = $y;
388+ print tainted($x);
389+ HERE
390+ ' 1' ,
391+ { stdin => ' 123' , switches => [ ' -t' ] },
392+ ' lvalue vec() propagates tainting on non-empty string; GH 22192'
393+ );
394+ }
395+
369396done_testing();
You can’t perform that action at this time.
0 commit comments