[PATCH] off-by-1 libata-scsi INQUIRY VPD pages 0x80 and 0x83
I have some code (in sginfo) that requests the first 4 bytes
of SCSI INQUIRY VPD pages to get their length then asks for
that exact length in a follow up request to fetch the payload.
Just like I saw with 36 byte standard INQUIRYs (no fixed)
I get a buffer full or zeroes.
BTW SCSI standards dictate that in situations where the allocation
length (in the cdb) is less than what is needed that what can be
sent shall be sent (i.e. truncated and without any error indication
or modification to the part of the response returned).
In other words it is up the the application client to take remedial
action.
Changelog:
- fix off-by-1 allocation length issue with SCSI
INQUIRY VPD pages 0x80 and 0x83
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Showing
Please register or sign in to comment