public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Adrian Bunk <bunk@stusta.de>
To: jgarzik@pobox.com
Cc: linux-net@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: drivers/net/at1700.c: at1700_probe1: array overflow
Date: Fri, 25 Mar 2005 19:18:36 +0100	[thread overview]
Message-ID: <20050325181836.GB3153@stusta.de> (raw)

The Coverity checker found the following:

<--  snip  -->

...
static int at1700_ioaddr_pattern[] __initdata = {
        0x00, 0x04, 0x01, 0x05, 0x02, 0x06, 0x03, 0x07
};
...
static int __init at1700_probe1(struct net_device *dev, int ioaddr)
{
...
	for (l_i = 0; l_i < 0x09; l_i++)
		if (( pos3 & 0x07) == at1700_ioaddr_pattern[l_i])
			break;
	ioaddr = at1700_mca_probe_list[l_i];
...
}
...

<--  snip  -->


This can result in indexing in an array with 8 entries the 10th entry.


cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed



             reply	other threads:[~2005-03-25 18:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-25 18:18 Adrian Bunk [this message]
2005-03-25 18:42 ` drivers/net/at1700.c: at1700_probe1: array overflow Roland Dreier
2005-03-25 20:38   ` Adrian Bunk
2005-03-30  0:49     ` null

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=20050325181836.GB3153@stusta.de \
    --to=bunk@stusta.de \
    --cc=jgarzik@pobox.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-net@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