diff options
author | pfg <pfg@FreeBSD.org> | 2016-04-03 16:38:15 +0000 |
---|---|---|
committer | pfg <pfg@FreeBSD.org> | 2016-04-03 16:38:15 +0000 |
commit | 654738b37a40fbab85dc975de5bcf68363c02cda (patch) | |
tree | 3174f039951c824f3d591230ecff18090a75bad2 /sys/cam | |
parent | 858326e785b319d64e65979df01adf4dd7762fa4 (diff) | |
download | FreeBSD-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
Diffstat (limited to 'sys/cam')
-rw-r--r-- | sys/cam/scsi/scsi_ch.c | 1 |
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); /* |