diff options
Diffstat (limited to 'ext/IO/t/io_taint.t')
-rwxr-xr-x | ext/IO/t/io_taint.t | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/ext/IO/t/io_taint.t b/ext/IO/t/io_taint.t index 4a9b76e84b..1cec9d7baf 100755 --- a/ext/IO/t/io_taint.t +++ b/ext/IO/t/io_taint.t @@ -18,7 +18,7 @@ BEGIN { END { unlink "./__taint__$$" } -print "1..3\n"; +print "1..5\n"; use IO::File; $x = new IO::File "> ./__taint__$$" || die("Cannot open ./__taint__$$\n"); print $x "$$\n"; @@ -43,4 +43,15 @@ print "not " if ($@ =~ /^Insecure/o); print "ok 3\n"; # No Insecure message from using the data $x->close; +# this will segfault if it fails + +sub PVBM () { 'foo' } +{ my $dummy = index 'foo', PVBM } + +eval { IO::Handle::untaint(PVBM) }; +print "ok 4\n"; + +eval { IO::Handle::untaint(\PVBM) }; +print "ok 5\n"; + exit 0; |