All of lore.kernel.org
 help / color / mirror / Atom feed
* [lm-sensors] drivers/hwmon/lm93.c: array overruns
@ 2007-07-23  0:54 ` Adrian Bunk
  0 siblings, 0 replies; 12+ 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


_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

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

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

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

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.