Changeset 221daa5 in mainline


Ignore:
Timestamp:
2024-06-13T08:24:01Z (3 weeks ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master
Children:
0b1f01c
Parents:
01d5049
git-author:
Jiri Svoboda <jiri@…> (2024-06-11 15:03:29)
git-committer:
Jiri Svoboda <jiri@…> (2024-06-13 08:24:01)
Message:

Fix off-by-one errors (thx Miroslav Cimerman)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/block/pci-ide/pci-ide.c

    r01d5049 r221daa5  
    605605
    606606        if (dir == ata_dma_write) {
    607                 assert(buf_size < chan->dma_buf_size);
     607                assert(buf_size <= chan->dma_buf_size);
    608608                memcpy(chan->dma_buf, buf, buf_size);
    609609        }
     
    641641
    642642        if (chan->cur_dir == ata_dma_read) {
    643                 assert(chan->cur_buf_size < chan->dma_buf_size);
     643                assert(chan->cur_buf_size <= chan->dma_buf_size);
    644644                memcpy(chan->cur_buf, chan->dma_buf, chan->cur_buf_size);
    645645        }
Note: See TracChangeset for help on using the changeset viewer.