We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 44e8369 commit 9837e1bCopy full SHA for 9837e1b
src/machine/usb/msc/scsi.go
@@ -235,7 +235,7 @@ func (m *msc) scsiCmdUnmap(cmd scsi.Cmd) {
235
// The parameter list has an 8 byte header and 16 bytes per item. If it's less than 24 bytes it's
236
// not the format we're expecting and we won't be able to decode it. Same for if there isn't a
237
// 8 byte header plus multiples of 16 bytes after that
238
- paramLen := binary.BigEndian.Uint16(m.cbw.Data[7:9])
+ paramLen := binary.BigEndian.Uint16(cmd.Data[7:9])
239
if paramLen < 24 || (paramLen-8)%16 != 0 {
240
m.sendScsiError(csw.StatusFailed, scsi.SenseIllegalRequest, scsi.SenseCodeInvalidFieldInCDB)
241
return
0 commit comments