df: untaint the result

This commit is contained in:
Wolfgang Bumiller 2016-07-04 12:59:51 +02:00 committed by Fabian Grünbichler
parent fb1391aae7
commit 28705ff6d1

View File

@ -851,9 +851,9 @@ sub df {
$pipe->reader();
my $readvalues = sub {
$res->{total} = int(<$pipe>);
$res->{used} = int(<$pipe>);
$res->{avail} = int(<$pipe>);
$res->{total} = int((<$pipe> =~ /^(\d*)$/)[0]);
$res->{used} = int((<$pipe> =~ /^(\d*)$/)[0]);
$res->{avail} = int((<$pipe> =~ /^(\d*)$/)[0]);
};
eval {
run_with_timeout($timeout, $readvalues);