diff options
author | Jamie Iles <jamie@nuviainc.com> | 2021-11-11 14:11:40 +0000 |
---|---|---|
committer | Alistair Francis <alistair.francis@wdc.com> | 2022-06-10 09:31:42 +1000 |
commit | af9751316e53cdf7e98131afe6928a5f4445fe16 (patch) | |
tree | 3af26f7aaa3c24eef6983ffe93b783bad3859908 /hw/core/generic-loader.c | |
parent | 40244040a7ac00d40db4dea02234d13502c30112 (diff) |
hw/core/loader: return image sizes as ssize_t
Various loader functions return an int which limits images to 2GB which
is fine for things like a BIOS/kernel image, but if we want to be able
to load memory images or large ramdisks then any file over 2GB would
silently fail to load.
Cc: Luc Michel <lmichel@kalray.eu>
Signed-off-by: Jamie Iles <jamie@nuviainc.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Luc Michel <lmichel@kalray.eu>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <20211111141141.3295094-2-jamie@nuviainc.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Diffstat (limited to 'hw/core/generic-loader.c')
-rw-r--r-- | hw/core/generic-loader.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/core/generic-loader.c b/hw/core/generic-loader.c index c666545aa0..4f4d77908d 100644 --- a/hw/core/generic-loader.c +++ b/hw/core/generic-loader.c @@ -67,7 +67,7 @@ static void generic_loader_realize(DeviceState *dev, Error **errp) GenericLoaderState *s = GENERIC_LOADER(dev); hwaddr entry; int big_endian; - int size = 0; + ssize_t size = 0; s->set_pc = false; |