* [Patch] Overrun in cdrom/aztcd.c
@ 2006-04-09 17:16 Eric Sesterhenn
0 siblings, 0 replies; only message in thread
From: Eric Sesterhenn @ 2006-04-09 17:16 UTC (permalink / raw)
To: LKML
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;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-04-09 17:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-09 17:16 [Patch] Overrun in cdrom/aztcd.c Eric Sesterhenn
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.