netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hans-Peter Jansen <hpj@urpla.net>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: Scott Bardone <sbardone@chelsio.com>,
	Adrian Bunk <bunk@stusta.de>,
	maintainers@chelsio.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: drivers/net/chelsio/sge.c: two array overflows
Date: Fri, 17 Mar 2006 13:19:19 +0100	[thread overview]
Message-ID: <200603171319.20935.hpj@urpla.net> (raw)
In-Reply-To: <441A011A.6010705@pobox.com>

[from the nitpick department..]

Hi Jeff, hi Scott,

Adrian wrote:
>The Coverity checker spotted the following two array overflows in 
>drivers/net/chelsio/sge.c (in both cases, the arrays contain 3 
>elements):

Am Freitag, 17. März 2006 01:21 schrieb Jeff Garzik:
> Scott Bardone wrote:
> > Adrian,
> >
> > This is a bug. The array should contain 2 elements.
> >
> > Attached is a patch which fixes it.
> > Thanks.
> >
> > Signed-off-by: Scott Bardone <sbardone@chelsio.com>
>
> applied.  please avoid attachments and use a proper patch description
> in the future.  I had to hand-edit and hand-apply your patch.

where you wrote in kernel tree commit 
347a444e687b5f8cf0f6485704db1c6024d3:
This is a bug. The array should contain 2 elements.  Here is the fix.

If I'm not completely off the track, you both committed a description 
off by one error: since the patch doesn't change the array size, it's 
presumely¹ still 3 elements, where index 2 references the last one.

Here's hopefully a better patch description:
Fixed off by one thinko in stats accounting, spotted by Coverity 
checker, notified by Adrian "The Cleanman" Bunk.

SCR,
Pete

¹) otherwise, it's still off by one..

  reply	other threads:[~2006-03-17 12:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-11  1:37 drivers/net/chelsio/sge.c: two array overflows Adrian Bunk
2006-03-13 19:31 ` Scott Bardone
2006-03-17  0:21   ` Jeff Garzik
2006-03-17 12:19     ` Hans-Peter Jansen [this message]
2006-03-17 18:46       ` Scott Bardone

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=200603171319.20935.hpj@urpla.net \
    --to=hpj@urpla.net \
    --cc=bunk@stusta.de \
    --cc=jgarzik@pobox.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maintainers@chelsio.com \
    --cc=netdev@vger.kernel.org \
    --cc=sbardone@chelsio.com \
    /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).