X-Git-Url: http://git.linex4red.de/pub/lufa.git/blobdiff_plain/67f390fe746ccc4d1dceac23f590eb1723cb7ff2..d0db78432fc02bacbd57cc9f15eb05b4e56981cb:/Demos/Device/LowLevel/MassStorage/MassStorage.c diff --git a/Demos/Device/LowLevel/MassStorage/MassStorage.c b/Demos/Device/LowLevel/MassStorage/MassStorage.c index ebb8e5c48..2c80fc595 100644 --- a/Demos/Device/LowLevel/MassStorage/MassStorage.c +++ b/Demos/Device/LowLevel/MassStorage/MassStorage.c @@ -256,6 +256,8 @@ static bool ReadInCommandBlock(void) /* Verify the command block - abort if invalid */ if ((CommandBlock.Signature != CBW_SIGNATURE) || (CommandBlock.LUN >= TOTAL_LUNS) || + (CommandBlock.Flags & 0x1F) || + (CommandBlock.SCSICommandLength == 0) || (CommandBlock.SCSICommandLength > MAX_SCSI_COMMAND_LENGTH)) { /* Stall both data pipes until reset by host */