public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* drivers/hwmon/lm93.c: array overruns
@ 2007-07-23  0:54 Adrian Bunk
  2007-07-23  7:36 ` Hans-Jürgen Koch
  0 siblings, 1 reply; 6+ messages in thread
From: Adrian Bunk @ 2007-07-23  0:54 UTC (permalink / raw)
  To: Hans-Jürgen Koch, Mark M. Hoffman; +Cc: lm-sensors, linux-kernel

The Coverity checker spotted the following array overruns
in drivers/hwmon/lm93.c:

<--  snip  -->

...
struct lm93_data {
...
        struct {
                u8 min;
                u8 max;
        } temp_lim[3];
...
};
...
static void lm93_update_client_common(struct lm93_data *data,
                                      struct i2c_client *client)
{
...
        for (i = 0; i < 4; i++) {
                data->temp_lim[i].min =
                        lm93_read_byte(client, LM93_REG_TEMP_MIN(i));
                data->temp_lim[i].max =
                        lm93_read_byte(client, LM93_REG_TEMP_MAX(i));
        }
...

<--  snip  -->

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-07-24 13:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-23  0:54 drivers/hwmon/lm93.c: array overruns Adrian Bunk
2007-07-23  7:36 ` Hans-Jürgen Koch
2007-07-24  8:10   ` [lm-sensors] " Jean Delvare
2007-07-24  8:26     ` Hans-Jürgen Koch
2007-07-24 12:00       ` Jean Delvare
2007-07-24 13:00   ` Mark M. Hoffman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox