]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix integer overflow on 32-bit systems when testing free space for writing a config... 36759/head
authorSergei Golovan <sgolovan@gmail.com>
Fri, 17 Feb 2023 07:05:05 +0000 (10:05 +0300)
committerSimon L <szaimen@e.mail.de>
Mon, 20 Feb 2023 09:05:45 +0000 (10:05 +0100)
lib/private/Config.php

index 7308a3769dfe05fa00ce7f957dc5ec12533a4628..a9ecaf2c8257f29b3d05838dc5c2ebd27cb0c975 100644 (file)
@@ -288,7 +288,7 @@ class Config {
                // Never write file back if disk space should be too low
                $df = disk_free_space($this->configDir);
                $size = strlen($content) + 10240;
-               if ($df !== false && (int)$df < $size) {
+               if ($df !== false && $df < (float)$size) {
                        throw new \Exception($this->configDir . " does not have enough space for writing the config file! Not writing it back!");
                }