Commit c227befc authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

Add taint checks to keep perl happy. This script runs on the remote

node!
parent dc34ab6c
......@@ -47,8 +47,11 @@ if (@ARGV != 2) {
if (defined($options{"s"})) {
my $num = $options{"s"};
if (! ($num =~ /\d/)) {
usage();
if ($num =~ /(\d)/) {
$num = $1;
}
else {
die("Tainted slice number: $num");
}
$slice = "-s $num";
......@@ -64,13 +67,13 @@ if ($device =~ /^([-\w.\/]+)$/) {
$device = $1;
}
else {
fatal("Tainted device name: $device");
die("Tainted device name: $device");
}
if ($filename =~ /^([-\w.\/]+)$/) {
$filename = $1;
}
else {
fatal("Tainted output filename: $filename");
die("Tainted output filename: $filename");
}
#
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment