diff options
author | Eric Sesterhenn <snakebyte@gmx.de> | 2006-04-19 06:09:20 +0200 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-04-20 02:51:38 +0200 |
commit | 1a34456bbbdaa939ffa567d15a0797c269f901b7 (patch) | |
tree | 6e9aae933bc008c661aa5de29d17862d59037bce /drivers/scsi/sim710.c | |
parent | [SCSI] lpfc 8.1.5 : Change version number to 8.1.5 (diff) | |
download | linux-1a34456bbbdaa939ffa567d15a0797c269f901b7.tar.xz linux-1a34456bbbdaa939ffa567d15a0797c269f901b7.zip |
[SCSI] Overrun in drivers/scsi/sim710.c
This fixes coverity bug id #480. Since id_array is declared as
id_array[MAX_SLOTS], the check for i>MAX_SLOTS is obviously false.
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/sim710.c')
-rw-r--r-- | drivers/scsi/sim710.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/sim710.c b/drivers/scsi/sim710.c index 3274ab76c8d3..255886a9ac55 100644 --- a/drivers/scsi/sim710.c +++ b/drivers/scsi/sim710.c @@ -75,7 +75,7 @@ param_setup(char *str) else if(!strncmp(pos, "id:", 3)) { if(slot == -1) { printk(KERN_WARNING "sim710: Must specify slot for id parameter\n"); - } else if(slot > MAX_SLOTS) { + } else if(slot >= MAX_SLOTS) { printk(KERN_WARNING "sim710: Illegal slot %d for id %d\n", slot, val); } else { id_array[slot] = val; |