aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSergei Golovan <sgolovan@gmail.com>2023-02-17 10:05:05 +0300
committerSimon L <szaimen@e.mail.de>2023-02-20 10:05:45 +0100
commit1cb50c5afa2e2bdfbbf1f90ff891c3d869473275 (patch)
tree07f3d8d26e4d5f48785b78bf5ec2e28c86de76fa /lib
parentbba3a1ccf0b41ee212cfb43ceee2b20e66904654 (diff)
downloadnextcloud-server-1cb50c5afa2e2bdfbbf1f90ff891c3d869473275.tar.gz
nextcloud-server-1cb50c5afa2e2bdfbbf1f90ff891c3d869473275.zip
Fix integer overflow on 32-bit systems when testing free space for writing a config file.
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Config.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/Config.php b/lib/private/Config.php
index 7308a3769df..a9ecaf2c825 100644
--- a/lib/private/Config.php
+++ b/lib/private/Config.php
@@ -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!");
}