linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: Jordan Crouse <jordan.crouse@amd.com>
Cc: bunk@stusta.de, linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: drivers/ide/pci/cs5535.c: array overrun
Date: Thu, 26 Jul 2007 21:11:21 +0200	[thread overview]
Message-ID: <200707262111.21296.bzolnier@gmail.com> (raw)
In-Reply-To: <20070724155952.GA13874@cosmic.amd.com>


Hi,

On Tuesday 24 July 2007, Jordan Crouse wrote:
> > The Coverity checker spotted the following array overrun in 
> > drivers/ide/pci/cs5535.c:
> 
> <-- snip -->
> 
> >	if (speed >= XFER_UDMA_0 && speed <= XFER_UDMA_7)
> >		reg |= cs5535_udma_timings[speed - XFER_UDMA_0];

Not a bug per se since the upper layer will never feed this function
with speed > XFER_UDMA_4 (thanks to ->ultra_mask being set to 0x1f).

Worth fixing anyway.

> Fix is attached.  Somebody got overzealous - the 5535 only supports
> up to UDMA4, which matches the array.

applied, thanks

Bart

      reply	other threads:[~2007-07-26 19:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <06FDA0246543E443ABBB36B1FCD5CC0603CF3360@SAUSEXMB2.amd.com>
2007-07-24 12:45 ` drivers/ide/pci/cs5535.c: array overrun Adrian Bunk
2007-07-24 15:59   ` Jordan Crouse
2007-07-26 19:11     ` Bartlomiej Zolnierkiewicz [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=200707262111.21296.bzolnier@gmail.com \
    --to=bzolnier@gmail.com \
    --cc=bunk@stusta.de \
    --cc=jordan.crouse@amd.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).