diff --git a/sys/cam/scsi/scsi_cd.c b/sys/cam/scsi/scsi_cd.c index 50fb4709aa9f..d408959c4655 100644 --- a/sys/cam/scsi/scsi_cd.c +++ b/sys/cam/scsi/scsi_cd.c @@ -1057,6 +1057,7 @@ cddone(struct cam_periph *periph, union ccb *done_ccb) cdp = &softc->params; announce_buf = softc->announce_temp; + bzero(announce_buf, CD_ANNOUNCETMP_SZ); rdcap = (struct scsi_read_capacity_data *)csio->data_ptr; @@ -1127,7 +1128,7 @@ cddone(struct cam_periph *periph, union ccb *done_ccb) &sense_key_desc, &asc_desc); snprintf(announce_buf, - sizeof(announce_buf), + CD_ANNOUNCETMP_SZ, "Attempt to query device " "size failed: %s, %s", sense_key_desc, @@ -1138,7 +1139,7 @@ cddone(struct cam_periph *periph, union ccb *done_ccb) && (csio->scsi_status == SCSI_STATUS_BUSY)) { snprintf(announce_buf, - sizeof(announce_buf), + CD_ANNOUNCETMP_SZ, "Attempt to query device " "size failed: SCSI Status: %s", scsi_status_string(csio));