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) { ...@@ -47,8 +47,11 @@ if (@ARGV != 2) {
if (defined($options{"s"})) { if (defined($options{"s"})) {
my $num = $options{"s"}; my $num = $options{"s"};
if (! ($num =~ /\d/)) { if ($num =~ /(\d)/) {
usage(); $num = $1;
}
else {
die("Tainted slice number: $num");
} }
$slice = "-s $num"; $slice = "-s $num";
...@@ -64,13 +67,13 @@ if ($device =~ /^([-\w.\/]+)$/) { ...@@ -64,13 +67,13 @@ if ($device =~ /^([-\w.\/]+)$/) {
$device = $1; $device = $1;
} }
else { else {
fatal("Tainted device name: $device"); die("Tainted device name: $device");
} }
if ($filename =~ /^([-\w.\/]+)$/) { if ($filename =~ /^([-\w.\/]+)$/) {
$filename = $1; $filename = $1;
} }
else { 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