Skip to content

Commit 8a9b4bf

Browse files
1-1samkhwilliamson
authored andcommitted
todo test for GH 22192 (lvalue vec() does not propagate tainting)
1 parent c2697a0 commit 8a9b4bf

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

t/run/todo.t

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff 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+
369396
done_testing();

0 commit comments

Comments
 (0)