From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47770) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WFSbM-00041e-BE for qemu-devel@nongnu.org; Mon, 17 Feb 2014 13:07:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WFSbG-0006fw-VN for qemu-devel@nongnu.org; Mon, 17 Feb 2014 13:07:32 -0500 Received: from mail-ee0-x236.google.com ([2a00:1450:4013:c00::236]:47862) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WFSbG-0006fl-Nz for qemu-devel@nongnu.org; Mon, 17 Feb 2014 13:07:26 -0500 Received: by mail-ee0-f54.google.com with SMTP id e53so7194469eek.41 for ; Mon, 17 Feb 2014 10:07:25 -0800 (PST) Sender: Paolo Bonzini Message-ID: <53024FD7.3060100@redhat.com> Date: Mon, 17 Feb 2014 19:07:19 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1392659611-8439-1-git-send-email-peter.maydell@linaro.org> In-Reply-To: <1392659611-8439-1-git-send-email-peter.maydell@linaro.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] hw/intc/exynos4210_combiner: Don't overrun output_irq array in init List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell , qemu-devel@nongnu.org Cc: Igor Mitsyanko , Maksim Kozlov , Dmitry Solodkiy , Evgeny Voevodin , patches@linaro.org Il 17/02/2014 18:53, Peter Maydell ha scritto: > The Exynos4210 combiner has IIC_NIRQ inputs and IIC_NGRP outputs; > use the correct constant in the loop initializing our output > sysbus IRQs so that we don't overrun the output_irq[] array. > > Signed-off-by: Peter Maydell > --- > hw/intc/exynos4210_combiner.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/hw/intc/exynos4210_combiner.c b/hw/intc/exynos4210_combiner.c > index ef5e8eb..3287479 100644 > --- a/hw/intc/exynos4210_combiner.c > +++ b/hw/intc/exynos4210_combiner.c > @@ -418,7 +418,7 @@ static int exynos4210_combiner_init(SysBusDevice *sbd) > qdev_init_gpio_in(dev, exynos4210_combiner_handler, IIC_NIRQ); > > /* Connect SysBusDev irqs to device specific irqs */ > - for (i = 0; i < IIC_NIRQ; i++) { > + for (i = 0; i < IIC_NGRP; i++) { > sysbus_init_irq(sbd, &s->output_irq[i]); > } > > -- 1.8.5 I think I saw more of these in Coverity output. Paolo