mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
hw/core/loader: Use ssize_t for efi zboot unpacker
Convert to use sszie_t to represent size internally to avoid large image overflowing the size. Suggested-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com> Signed-off-by: Bibo Mao <maobibo@loongson.cn> Reviewed-by: Bibo Mao <maobibo@loongson.cn>
This commit is contained in:
parent
3f8bcbba3b
commit
e3526d0fd7
3 changed files with 4 additions and 4 deletions
|
@ -857,7 +857,7 @@ static uint64_t load_aarch64_image(const char *filename, hwaddr mem_base,
|
|||
hwaddr kernel_load_offset = KERNEL64_LOAD_ADDR;
|
||||
uint64_t kernel_size = 0;
|
||||
uint8_t *buffer;
|
||||
int size;
|
||||
ssize_t size;
|
||||
|
||||
/* On aarch64, it's the bootloader's job to uncompress the kernel. */
|
||||
size = load_image_gzipped_buffer(filename, LOAD_IMAGE_MAX_GUNZIP_BYTES,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue