+1
−1
Loading
A device can report an excessive number of VPD pages when asked for a list; this can cause an out-of-bounds access to buf in scsi_generic_set_vpd_bl_emulation. It should not happen, but it is technically not incorrect so handle it: do not check any byte past the allocation length that was sent to the INQUIRY command. Reported-by:Max Reitz <mreitz@redhat.com> Reviewed-by:
Max Reitz <mreitz@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>