Skip to content

Commit

Permalink
[SCSI] Overrun in drivers/scsi/sim710.c
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eric Sesterhenn authored and James Bottomley committed Apr 20, 2006
1 parent 36ab261 commit 1a34456
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/scsi/sim710.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 1a34456

Please sign in to comment.