diff options
author | j_mayer <j_mayer@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-11-17 02:04:00 +0000 |
---|---|---|
committer | j_mayer <j_mayer@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-11-17 02:04:00 +0000 |
commit | 7b62a955047934bab158e84ecb63cb432c193ace (patch) | |
tree | e9b6c0cc8786a675432824952574a5d9a5399b0f /hw/ppc.c | |
parent | 5e692ecdbff27d5a4c9ffdc76fa43d3dc163d119 (diff) | |
download | qemu-7b62a955047934bab158e84ecb63cb432c193ace.zip qemu-7b62a955047934bab158e84ecb63cb432c193ace.tar.gz qemu-7b62a955047934bab158e84ecb63cb432c193ace.tar.bz2 |
Add missing definition for number of input pins for the PowerPC 970 bus.
Use proper INPUT_NB definitions to allocate PowerPC input pins structure,
fixing a buffer overflow in the 6xx bus case.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3659 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/ppc.c')
-rw-r--r-- | hw/ppc.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -172,7 +172,8 @@ static void ppc6xx_set_irq (void *opaque, int pin, int level) void ppc6xx_irq_init (CPUState *env) { - env->irq_inputs = (void **)qemu_allocate_irqs(&ppc6xx_set_irq, env, 6); + env->irq_inputs = (void **)qemu_allocate_irqs(&ppc6xx_set_irq, env, + PPC6xx_INPUT_NB); } #if defined(TARGET_PPC64) @@ -295,7 +296,8 @@ static void ppc970_set_irq (void *opaque, int pin, int level) void ppc970_irq_init (CPUState *env) { - env->irq_inputs = (void **)qemu_allocate_irqs(&ppc970_set_irq, env, 7); + env->irq_inputs = (void **)qemu_allocate_irqs(&ppc970_set_irq, env, + PPC970_INPUT_NB); } #endif /* defined(TARGET_PPC64) */ |