summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2016-04-03 16:38:15 +0000
committerpfg <pfg@FreeBSD.org>2016-04-03 16:38:15 +0000
commit654738b37a40fbab85dc975de5bcf68363c02cda (patch)
tree3174f039951c824f3d591230ecff18090a75bad2
parent858326e785b319d64e65979df01adf4dd7762fa4 (diff)
downloadFreeBSD-src-654738b37a40fbab85dc975de5bcf68363c02cda.zip
FreeBSD-src-654738b37a40fbab85dc975de5bcf68363c02cda.tar.gz
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
-rw-r--r--sys/cam/scsi/scsi_ch.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/cam/scsi/scsi_ch.c b/sys/cam/scsi/scsi_ch.c
index c969391..8e069db 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);
/*
OpenPOWER on IntegriCloud