From f18b18fe5fb000f6deeeb92e9fec6e91102efaec Mon Sep 17 00:00:00 2001 From: "Pedro F. Giffuni" Date: Sun, 3 Apr 2016 16:38:15 +0000 Subject: [PATCH] chdone(): Prevent returning uninitialized scalar value. If there is an error different from ERESTART, there is some chance that we may end up accessing an uninitialized value. This doesn't seem likely/possible but initialize announce_buf[0], just in case. CID: 1006486 --- sys/cam/scsi/scsi_ch.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/cam/scsi/scsi_ch.c b/sys/cam/scsi/scsi_ch.c index c969391b323..8e069db6e04 100644 --- a/sys/cam/scsi/scsi_ch.c +++ b/sys/cam/scsi/scsi_ch.c @@ -651,6 +651,7 @@ chdone(struct cam_periph *periph, union ccb *done_ccb) } else { int error; + announce_buf[0] = '\0'; error = cherror(done_ccb, CAM_RETRY_SELTO, SF_RETRY_UA | SF_NO_PRINT); /*