]> git.proxmox.com Git - pve-common.git/blobdiff - src/PVE/Tools.pm
fix Tools::df for big storage usage values
[pve-common.git] / src / PVE / Tools.pm
index 02c28867f0c2d4ec038d0115063eb2895549372b..89de4ecff288a048447063a55311453b2865098c 100644 (file)
@@ -1008,7 +1008,7 @@ sub df {
     warn $@ if $@;
 
     # untaint the values
-    my ($blocks, $used, $bavail) = map { defined($_) ? (/^(\d+)$/) : 0 }
+    my ($blocks, $used, $bavail) = map { defined($_) ? (/^([\d\.e\-+]+)$/) : 0 } # can be in scientific notation
        $res->@{qw(blocks used bavail)};
 
     return {