Messages in this thread Patch in this message | | | Subject | [Patch] Overrun in cdrom/aztcd.c | From | Eric Sesterhenn <> | Date | Sun, 09 Apr 2006 19:16:06 +0200 |
| |
hi,
this fixes coverity bug id #473. After the for loop i==16 if we dont find a cdrom. So we should check for i==16 first before checking the array element.
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
--- linux-2.6.17-rc1/drivers/cdrom/aztcd.c.orig 2006-04-09 19:09:24.000000000 +0200 +++ linux-2.6.17-rc1/drivers/cdrom/aztcd.c 2006-04-09 19:09:49.000000000 +0200 @@ -1763,7 +1763,7 @@ static int __init aztcd_init(void) release_region(azt_port, 4); } } - if ((azt_port_auto[i] == 0) || (i == 16)) { + if ((i == 16) || (azt_port_auto[i] == 0)) { printk(KERN_INFO "aztcd: no AZTECH CD-ROM drive found\n"); return -EIO; }
- 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/
| |