Messages in this thread Patch in this message | | | Subject | [Patch] Overrun in drivers/scsi/sim710.c | From | Eric Sesterhenn <> | Date | Sun, 09 Apr 2006 19:30:36 +0200 |
| |
hi,
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>
--- linux-2.6.17-rc1/drivers/scsi/sim710.c.orig 2006-04-09 19:25:13.000000000 +0200 +++ linux-2.6.17-rc1/drivers/scsi/sim710.c 2006-04-09 19:27:07.000000000 +0200 @@ -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;
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |