From: Anthony Liguori <anthony@codemonkey.ws>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-devel@nongnu.org, patches@linaro.org
Subject: Re: [Qemu-devel] [PATCH] hw/arm_timer.c: Fix bounds check for Integrator timer accesses
Date: Fri, 11 Nov 2011 13:46:32 -0600 [thread overview]
Message-ID: <4EBD7B98.2010006@codemonkey.ws> (raw)
In-Reply-To: <1321018215-13754-1-git-send-email-peter.maydell@linaro.org>
On 11/11/2011 07:30 AM, Peter Maydell wrote:
> There are only three counter/timers on the integrator board:
> correct the bounds check to avoid an array overrun. (Spotted
> by Coverity, see bug 887883).
>
> Signed-off-by: Peter Maydell<peter.maydell@linaro.org>
Applied. Thanks.
Regards,
Anthony Liguori
> ---
> hw/arm_timer.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/hw/arm_timer.c b/hw/arm_timer.c
> index 09a4b24..66db81d 100644
> --- a/hw/arm_timer.c
> +++ b/hw/arm_timer.c
> @@ -269,7 +269,7 @@ static uint64_t icp_pit_read(void *opaque, target_phys_addr_t offset,
>
> /* ??? Don't know the PrimeCell ID for this device. */
> n = offset>> 8;
> - if (n> 3) {
> + if (n> 2) {
> hw_error("sp804_read: Bad timer %d\n", n);
> }
>
> @@ -283,7 +283,7 @@ static void icp_pit_write(void *opaque, target_phys_addr_t offset,
> int n;
>
> n = offset>> 8;
> - if (n> 3) {
> + if (n> 2) {
> hw_error("sp804_write: Bad timer %d\n", n);
> }
>
prev parent reply other threads:[~2011-11-11 19:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-11 13:30 [Qemu-devel] [PATCH] hw/arm_timer.c: Fix bounds check for Integrator timer accesses Peter Maydell
2011-11-11 19:46 ` Anthony Liguori [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4EBD7B98.2010006@codemonkey.ws \
--to=anthony@codemonkey.ws \
--cc=patches@linaro.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.