From: Adrian Bunk <bunk@stusta.de>
To: Rodolfo Giometti <giometti@linux.it>,
David Brownell <dbrownell@users.sourceforge.net>,
a.zummo@towertech.it
Cc: rtc-linux@googlegroups.com, linux-kernel@vger.kernel.org
Subject: rtc-ds1307.c: array overrun
Date: Mon, 23 Jul 2007 02:44:22 +0200 [thread overview]
Message-ID: <20070723004422.GR26212@stusta.de> (raw)
The Coverity checker spotted the following array overrun
in drivers/rtc/rtc-ds1307.c:
<-- snip -->
...
#define DS1337_REG_CONTROL 0x0e
...
struct ds1307 {
u8 reg_addr;
u8 regs[8];
...
};
...
static int __devinit ds1307_probe(struct i2c_client *client)
{
...
ds1307->regs[DS1337_REG_CONTROL]
...
<-- snip -->
0x0e > 8
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
next reply other threads:[~2007-07-23 0:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-23 0:44 Adrian Bunk [this message]
2007-07-23 1:17 ` rtc-ds1307.c: array overrun David Brownell
2007-07-25 1:37 ` [rtc-linux] " Alessandro Zummo
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=20070723004422.GR26212@stusta.de \
--to=bunk@stusta.de \
--cc=a.zummo@towertech.it \
--cc=dbrownell@users.sourceforge.net \
--cc=giometti@linux.it \
--cc=linux-kernel@vger.kernel.org \
--cc=rtc-linux@googlegroups.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 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.