mirror of
https://git.proxmox.com/git/pve-common
synced 2025-05-29 17:00:43 +00:00
df: untaint the result
This commit is contained in:
parent
fb1391aae7
commit
28705ff6d1
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user