diff --git a/sys/cam/scsi/scsi_ses.c b/sys/cam/scsi/scsi_ses.c index b8048a99017c..ea6caa56f79f 100644 --- a/sys/cam/scsi/scsi_ses.c +++ b/sys/cam/scsi/scsi_ses.c @@ -749,6 +749,9 @@ ses_type(void *buf, int buflen) { unsigned char *iqd = buf; + if (buflen == 0) + buflen = 256; /* per SPC-2 */ + if (buflen < 8+SEN_ID_LEN) return (SES_NONE);