diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2021-07-22 20:21:52 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2021-07-23 00:26:35 +0000 |
commit | cb92280ecad660fa3196f7addea6bd49b0147863 (patch) | |
tree | e6ac6e5c5de481c4d360b46b57c2413d0bb0b223 /firmware | |
parent | 68294da574b29edb48904fb31a4a976a28040940 (diff) |
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
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/usbstack/usb_storage.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/firmware/usbstack/usb_storage.c b/firmware/usbstack/usb_storage.c index 39ccb9a6e5..8e1b507ac4 100644 --- a/firmware/usbstack/usb_storage.c +++ b/firmware/usbstack/usb_storage.c @@ -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 */ |