projects
/
platform
/
upstream
/
bluez.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b764b63
)
monitor: Fix uninitiailzed scalar variable
author
Tedd Ho-Jeong An
<tedd.an@intel.com>
Sat, 13 Nov 2021 02:35:58 +0000
(18:35 -0800)
committer
Ayush Garg
<ayush.garg@samsung.com>
Fri, 11 Mar 2022 13:38:38 +0000
(19:08 +0530)
This patch fixes the uninitiailzed varialble(CWE-457) reported by
the Coverity scan.
Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
monitor/rfcomm.c
patch
|
blob
|
history
diff --git
a/monitor/rfcomm.c
b/monitor/rfcomm.c
index
40250ce
..
70e7e1d
100755
(executable)
--- a/
monitor/rfcomm.c
+++ b/
monitor/rfcomm.c
@@
-436,6
+436,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))