⬢ DragonFlyBSD Kernel Audit
DF-2342 / fix.diff
← back to finding ↓ download raw
--- a/sys/bus/u4b/serial/uchcom.c
+++ b/sys/bus/u4b/serial/uchcom.c
@@ -415,6 +415,7 @@
     uint8_t reg1, uint8_t *rval1, uint8_t reg2, uint8_t *rval2)
 {
 	uint8_t buf[UCHCOM_INPUT_BUF_SIZE];
+	bzero(buf, sizeof(buf));
 
 	uchcom_ctrl_read(
 	    sc, UCHCOM_REQ_READ_REG,
@@ -434,6 +435,7 @@
 uchcom_get_version(struct uchcom_softc *sc, uint8_t *rver)
 {
 	uint8_t buf[UCHCOM_INPUT_BUF_SIZE];
+	bzero(buf, sizeof(buf));
 
 	uchcom_ctrl_read(sc, UCHCOM_REQ_GET_VERSION, 0, 0, buf, sizeof(buf));