diff options
author | William Wilgus <wilgus.william@gmail.com> | 2024-06-02 23:05:46 -0400 |
---|---|---|
committer | William Wilgus <me.theuser@yahoo.com> | 2024-06-05 19:00:15 -0400 |
commit | 74552d5404e6ada5a37042d8de789784d914a080 (patch) | |
tree | 8731976444338ea7e928806df2023b3164d5731d | |
parent | 2109d524e86b50a181923df2407f039d3d512fa5 (diff) | |
download | rockbox-74552d5404.tar.gz rockbox-74552d5404.zip |
[coverity] RFC ata-imx31.c UDMA mode timing tables out of bounds reads
mode only goes 0-4 the original commit mixed up the index and mode
bad stuff must happen but its been here for 16 years
Change-Id: I7e69f4e2574029a6bc3cea76e8803d2d0357d9e2
-rw-r--r-- | firmware/target/arm/imx31/ata-imx31.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/firmware/target/arm/imx31/ata-imx31.c b/firmware/target/arm/imx31/ata-imx31.c index 3b08a38c1b..ac29cf5770 100644 --- a/firmware/target/arm/imx31/ata-imx31.c +++ b/firmware/target/arm/imx31/ata-imx31.c @@ -417,13 +417,13 @@ void ata_dma_set_mode(unsigned char mode) else if (dmamode == 0x40 && modeidx <= ATA_MAX_UDMA) { /* Using Ultra DMA */ - ata_set_udma_timings(dmamode); + ata_set_udma_timings(modeidx); ata_dma_selected = ATA_DMA_UDMA; } else if (dmamode == 0x20 && modeidx <= ATA_MAX_MWDMA) { /* Using Multiword DMA */ - ata_set_mdma_timings(dmamode); + ata_set_mdma_timings(modeidx); ata_dma_selected = ATA_DMA_MWDMA; } else |