mirror of
https://git.proxmox.com/git/fwupd
synced 2025-07-27 11:09:28 +00:00
Limit the archive size to 25% of the RAM, or 4G
PVS: Expression is always false
This commit is contained in:
parent
f5d51d80eb
commit
aaf1f21dd3
@ -172,7 +172,7 @@ fu_config_reload(FuConfig *self, GError **error)
|
||||
guint64 memory_size = fu_common_get_memory_size();
|
||||
g_autofree gchar *str = NULL;
|
||||
if (memory_size > 0) {
|
||||
self->archive_size_max = MAX(memory_size / 4, G_MAXSIZE);
|
||||
self->archive_size_max = MIN(memory_size / 4, G_MAXUINT32);
|
||||
str = g_format_size(self->archive_size_max);
|
||||
g_debug("using autodetected max archive size %s", str);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user