mirror of
https://git.proxmox.com/git/pve-common
synced 2025-05-30 10:56:14 +00:00
df: untaint the result
This commit is contained in:
parent
fb1391aae7
commit
28705ff6d1
@ -851,9 +851,9 @@ sub df {
|
|||||||
$pipe->reader();
|
$pipe->reader();
|
||||||
|
|
||||||
my $readvalues = sub {
|
my $readvalues = sub {
|
||||||
$res->{total} = int(<$pipe>);
|
$res->{total} = int((<$pipe> =~ /^(\d*)$/)[0]);
|
||||||
$res->{used} = int(<$pipe>);
|
$res->{used} = int((<$pipe> =~ /^(\d*)$/)[0]);
|
||||||
$res->{avail} = int(<$pipe>);
|
$res->{avail} = int((<$pipe> =~ /^(\d*)$/)[0]);
|
||||||
};
|
};
|
||||||
eval {
|
eval {
|
||||||
run_with_timeout($timeout, $readvalues);
|
run_with_timeout($timeout, $readvalues);
|
||||||
|
Loading…
Reference in New Issue
Block a user