* [2.6 patch] pata_cs5536.c: fix array overrun
@ 2007-10-18 10:51 Adrian Bunk
2007-10-18 16:36 ` Martin K. Petersen
0 siblings, 1 reply; 2+ messages in thread
From: Adrian Bunk @ 2007-10-18 10:51 UTC (permalink / raw)
To: Martin K. Petersen, Jeff Garzik, Alan Cox; +Cc: linux-ide, linux-kernel
This patch fixes an obvious array overrun spotted by the Coverity
checker.
Signed-off-by: Adrian Bunk <bunk@kernel.org>
---
9101f2e2691094244bd147a05225f6c84bdf7404
diff --git a/drivers/ata/pata_cs5536.c b/drivers/ata/pata_cs5536.c
index 53070f6..00039a1 100644
--- a/drivers/ata/pata_cs5536.c
+++ b/drivers/ata/pata_cs5536.c
@@ -214,7 +214,7 @@ static void cs5536_set_dmamode(struct ata_port *ap, struct ata_device *adev)
cs5536_read(pdev, DTC, &dtc);
dtc &= ~(IDE_DRV_MASK << dshift);
- dtc |= mwdma_timings[mode] << dshift;
+ dtc |= mwdma_timings[mode - XFER_MW_DMA_0] << dshift;
cs5536_write(pdev, DTC, dtc);
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [2.6 patch] pata_cs5536.c: fix array overrun
2007-10-18 10:51 [2.6 patch] pata_cs5536.c: fix array overrun Adrian Bunk
@ 2007-10-18 16:36 ` Martin K. Petersen
0 siblings, 0 replies; 2+ messages in thread
From: Martin K. Petersen @ 2007-10-18 16:36 UTC (permalink / raw)
To: Adrian Bunk
Cc: Martin K. Petersen, Jeff Garzik, Alan Cox, linux-ide,
linux-kernel
>>>>> "Adrian" == Adrian Bunk <bunk@kernel.org> writes:
Adrian> This patch fixes an obvious array overrun spotted by the
Adrian> Coverity checker.
Bart already posted a patch for this.
--
Martin K. Petersen http://mkp.net/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-10-18 16:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-18 10:51 [2.6 patch] pata_cs5536.c: fix array overrun Adrian Bunk
2007-10-18 16:36 ` Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).