emulator: Fix uninitiailzed scalar variable
PATCH 1/3 emulator: Fix uninitiailzed scalar variable
From: Tedd Ho-Jeong An <[email protected]>
This patch fixes the uninitiailzed varialble(CWE-457) reported by the Coverity scan.
--- emulator/bthost.c | 3 +++ 1 file changed, 3 insertions(+)
emulator/bthost.c +3 -0
@@ -1570,6 +1570,7 @@ static void rfcomm_sabm_send(struct bthost *bthost, struct btconn *conn, {struct rfcomm_cmd cmd; +memset (&cmd,0 ,sizeof (cmd)); cmd.address =RFCOMM_ADDR (cr, dlci); cmd.control =RFCOMM_CTRL (RFCOMM_SABM ,1 ); cmd.length =RFCOMM_LEN8 (0 );
@@ -2123,6 +2124,7 @@ static void rfcomm_ua_send(struct bthost *bthost, struct btconn *conn, {struct rfcomm_cmd cmd; +memset (&cmd,0 ,sizeof (cmd)); cmd.address =RFCOMM_ADDR (cr, dlci); cmd.control =RFCOMM_CTRL (RFCOMM_UA ,1 ); cmd.length =RFCOMM_LEN8 (0 );
@@ -2136,6 +2138,7 @@ static void rfcomm_dm_send(struct bthost *bthost, struct btconn *conn, {struct rfcomm_cmd cmd; +memset (&cmd,0 ,sizeof (cmd)); cmd.address =RFCOMM_ADDR (cr, dlci); cmd.control =RFCOMM_CTRL (RFCOMM_DM ,1 ); cmd.length =RFCOMM_LEN8 (0 );
Signature · 1 line
2.25.1
PATCH 2/3 monitor: Fix uninitiailzed scalar variable
From: Tedd Ho-Jeong An <[email protected]>
This patch fixes the uninitiailzed varialble(CWE-457) reported by the Coverity scan.
--- monitor/rfcomm.c | 1 + 1 file changed, 1 insertion(+)
monitor/rfcomm.c +1 -0
@@ -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))
Signature · 1 line
2.25.1
PATCH 3/3 client: Fix uninitiailzed scalar variable
In reply to Tedd Ho-Jeong AnFrom: Tedd Ho-Jeong An <[email protected]>
This patch fixes the uninitiailzed varialble(CWE-457) reported by the Coverity scan.
--- client/gatt.c | 3 +++ 1 file changed, 3 insertions(+)
client/gatt.c +3 -0
@@ -175,6 +175,7 @@ static void print_service_proxy(GDBusProxy *proxy, const char *description)dbus_message_iter_get_basic (&iter, &primary); +memset (&service,0 ,sizeof (service)); service.path = (char *)g_dbus_proxy_get_path (proxy); service.uuid = (char *) uuid; service.primary = primary;
@@ -257,6 +258,7 @@ static void print_characteristic(GDBusProxy *proxy, const char *description)dbus_message_iter_get_basic (&iter, &uuid); +memset (&chrc,0 ,sizeof (chrc)); chrc.path = (char *)g_dbus_proxy_get_path (proxy); chrc.uuid = (char *) uuid;
@@ -350,6 +352,7 @@ static void print_descriptor(GDBusProxy *proxy, const char *description)dbus_message_iter_get_basic (&iter, &uuid); +memset (&desc,0 ,sizeof (desc)); desc.path = (char *)g_dbus_proxy_get_path (proxy); desc.uuid = (char *) uuid;
Signature · 1 line
2.25.1
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=579489
---Test result---
Test Summary:
CheckPatch PASS 3.70 seconds GitLint PASS 2.48 seconds Prep - Setup ELL PASS 44.05 seconds Build - Prep PASS 0.48 seconds Build - Configure PASS 8.20 seconds Build - Make PASS 185.97 seconds Make Check PASS 9.37 seconds Make Distcheck PASS 228.10 seconds Build w/ext ELL - Configure PASS 8.27 seconds Build w/ext ELL - Make PASS 175.09 seconds
---
Regards,
Linux Bluetooth