Message ID | 20211113023559.212793-2-hj.tedd.an@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Luiz Von Dentz |
Headers | show |
Series | [BlueZ,1/3] emulator: Fix uninitiailzed scalar variable | expand |
Context | Check | Description |
---|---|---|
tedd_an/checkpatch | success | Checkpatch PASS |
tedd_an/gitlint | success | Gitlint PASS |
diff --git a/monitor/rfcomm.c b/monitor/rfcomm.c index 41533b158..02300a8b5 100644 --- a/monitor/rfcomm.c +++ b/monitor/rfcomm.c @@ -437,6 +437,7 @@ void rfcomm_packet(const struct l2cap_frame *frame) if (frame->size < 4) goto fail; + memset(&hdr, 0, sizeof(hdr)); if (!l2cap_frame_get_u8(l2cap_frame, &hdr.address) || !l2cap_frame_get_u8(l2cap_frame, &hdr.control) || !l2cap_frame_get_u8(l2cap_frame, &length))
From: Tedd Ho-Jeong An <tedd.an@intel.com> This patch fixes the uninitiailzed varialble(CWE-457) reported by the Coverity scan. --- monitor/rfcomm.c | 1 + 1 file changed, 1 insertion(+)