READ6, make the truncation from a potantial 9-bit value (0-256) to 8 bits
explicit by masking it with 0xff instead of relying on obscure truncation rules.
This commit is contained in:
+1
-1
@@ -1422,7 +1422,7 @@ scsi_cdb_read6(uint32_t lba, uint32_t xferlen, int blocksize)
|
|||||||
task->cdb[3] = (lba )&0xff;
|
task->cdb[3] = (lba )&0xff;
|
||||||
|
|
||||||
if (num_blocks < 256) {
|
if (num_blocks < 256) {
|
||||||
task->cdb[4] = num_blocks;
|
task->cdb[4] = num_blocks & 0xff;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (xferlen != 0) {
|
if (xferlen != 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user