usb_storage: Fix a memset in SCSI_INQUIRY that overflowed its buffer

The funny thing is that the memset() for the field in question was
redundant, as the overall inquiry structure was memset(0) already.

Change-Id: I8bec0c93c9317823ff39cf7133535e3bf58fb987
This commit is contained in:
Solomon Peachy 2021-07-22 20:21:52 -04:00
parent 68294da574
commit cb92280eca

View file

@ -1245,7 +1245,7 @@ static void fill_inquiry(IF_MD_NONVOID(int lun))
tb.inquiry->DeviceType = DIRECT_ACCESS_DEVICE;
tb.inquiry->AdditionalLength = 0x1f;
memset(tb.inquiry->Reserved, 0, 3);
// memset(tb.inquiry->Reserved, 0, sizeof(tb.inquiry->Reserved)); // Redundant
tb.inquiry->Versions = 4; /* SPC-2 */
tb.inquiry->Format = 2; /* SPC-2/3 inquiry format */