diff options
author | Eric Sesterhenn <snakebyte@gmx.de> | 2006-04-19 00:09:20 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-04-19 20:51:38 -0400 |
commit | 1a34456bbbdaa939ffa567d15a0797c269f901b7 (patch) | |
tree | 6e9aae933bc008c661aa5de29d17862d59037bce /drivers/scsi | |
parent | 36ab26185c0b6060203829bce32eaeab0fa781ae (diff) |
[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')
-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) | |||
75 | else if(!strncmp(pos, "id:", 3)) { | 75 | else if(!strncmp(pos, "id:", 3)) { |
76 | if(slot == -1) { | 76 | if(slot == -1) { |
77 | printk(KERN_WARNING "sim710: Must specify slot for id parameter\n"); | 77 | printk(KERN_WARNING "sim710: Must specify slot for id parameter\n"); |
78 | } else if(slot > MAX_SLOTS) { | 78 | } else if(slot >= MAX_SLOTS) { |
79 | printk(KERN_WARNING "sim710: Illegal slot %d for id %d\n", slot, val); | 79 | printk(KERN_WARNING "sim710: Illegal slot %d for id %d\n", slot, val); |
80 | } else { | 80 | } else { |
81 | id_array[slot] = val; | 81 | id_array[slot] = val; |