diff options
author | Avi Kivity <avi@redhat.com> | 2010-05-09 14:51:13 +0300 |
---|---|---|
committer | Aurelien Jarno <aurelien@aurel32.net> | 2010-05-28 21:33:59 +0200 |
commit | 97679527bf2f002225d08cfb93f840cef449ac0e (patch) | |
tree | 10658c03eeb795084ff06a269326a7432cb94ba4 /hw/piix_pci.c | |
parent | 9ba8c3f41d47f2051ea4bdb7156978f941ea7324 (diff) |
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: Avi Kivity <avi@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'hw/piix_pci.c')
-rw-r--r-- | hw/piix_pci.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/piix_pci.c b/hw/piix_pci.c index aff7f6d467..d14d05e1f8 100644 --- a/hw/piix_pci.c +++ b/hw/piix_pci.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; |