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:
parent
68294da574
commit
cb92280eca
1 changed files with 1 additions and 1 deletions
|
@ -1245,7 +1245,7 @@ static void fill_inquiry(IF_MD_NONVOID(int lun))
|
||||||
|
|
||||||
tb.inquiry->DeviceType = DIRECT_ACCESS_DEVICE;
|
tb.inquiry->DeviceType = DIRECT_ACCESS_DEVICE;
|
||||||
tb.inquiry->AdditionalLength = 0x1f;
|
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->Versions = 4; /* SPC-2 */
|
||||||
tb.inquiry->Format = 2; /* SPC-2/3 inquiry format */
|
tb.inquiry->Format = 2; /* SPC-2/3 inquiry format */
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue