提交 97679527 编写于 作者: A Avi Kivity 提交者: Aurelien Jarno

Fix overflow in i440fx_init()

The ram_size parameter can be larger than an int, so it may be truncated.

Fix by using the correct type.
Signed-off-by: NAvi Kivity <avi@redhat.com>
Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
上级 9ba8c3f4
......@@ -135,7 +135,7 @@ int pcspk_audio_init(qemu_irq *pic);
struct PCII440FXState;
typedef struct PCII440FXState PCII440FXState;
PCIBus *i440fx_init(PCII440FXState **pi440fx_state, int *piix_devfn, qemu_irq *pic, int ram_size);
PCIBus *i440fx_init(PCII440FXState **pi440fx_state, int *piix_devfn, qemu_irq *pic, ram_addr_t ram_size);
void i440fx_init_memory_mappings(PCII440FXState *d);
/* piix4.c */
......
......@@ -216,7 +216,7 @@ static int i440fx_initfn(PCIDevice *dev)
return 0;
}
PCIBus *i440fx_init(PCII440FXState **pi440fx_state, int *piix3_devfn, qemu_irq *pic, int ram_size)
PCIBus *i440fx_init(PCII440FXState **pi440fx_state, int *piix3_devfn, qemu_irq *pic, ram_addr_t ram_size)
{
DeviceState *dev;
PCIBus *b;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册