scsi_periph: check block_size against zero in io().

* should help with #10466
This commit is contained in:
Jérôme Duval 2014-01-27 19:45:43 +01:00
parent 06254ef863
commit bfdb2a4938

View File

@ -367,6 +367,8 @@ periph_io(scsi_periph_device_info *device, io_operation *operation,
size_t* _bytesTransferred)
{
const uint32 blockSize = device->block_size;
if (blockSize == 0)
return B_BAD_VALUE;
// don't test rw10_enabled restrictions - this flag may get changed
scsi_ccb *request = device->scsi->alloc_ccb(device->scsi_device);