svn commit: r297527 - head/sys/cam/scsi
Pedro F. Giffuni
pfg at FreeBSD.org
Sun Apr 3 16:38:17 UTC 2016
Author: pfg
Date: Sun Apr 3 16:38:15 2016
New Revision: 297527
URL: https://svnweb.freebsd.org/changeset/base/297527
Log:
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
Modified:
head/sys/cam/scsi/scsi_ch.c
Modified: head/sys/cam/scsi/scsi_ch.c
==============================================================================
--- head/sys/cam/scsi/scsi_ch.c Sun Apr 3 16:25:51 2016 (r297526)
+++ head/sys/cam/scsi/scsi_ch.c Sun Apr 3 16:38:15 2016 (r297527)
@@ -651,6 +651,7 @@ chdone(struct cam_periph *periph, union
} else {
int error;
+ announce_buf[0] = '\0';
error = cherror(done_ccb, CAM_RETRY_SELTO,
SF_RETRY_UA | SF_NO_PRINT);
/*
More information about the svn-src-all
mailing list