Bluetooth: Fix get device flags command returns garbage parameter
Subsystems (2)
PATCH 1/1 Bluetooth: Fix get device flags command returns garbage parameter
From: Tedd Ho-Jeong An <[email protected]>
This patch memset the response parameter so it doesn't return the garbage value when the Get Device Flags command fails.
Signed-off-by Tedd Ho-Jeong An <[email protected]>
--- net/bluetooth/mgmt.c | 2 ++ 1 file changed, 2 insertions(+)
net/bluetooth/mgmt.c +2 -0
@@ -4061,6 +4061,8 @@ static int get_device_flags(struct sock *sk, struct hci_dev *hdev, void *data,hci_dev_lock (hdev); +memset (&rp,0 ,sizeof (rp)); +if (cp->addr.type ==BDADDR_BREDR ) { br_params = hci_bdaddr_list_lookup_with_flags(&hdev->whitelist, &cp->addr.bdaddr,
Signature · 1 line
2.26.3
Marcel Holtmann
maintainerHi Tedd,
Quoted 3 lines
This patch memset the response parameter so it doesn't return the garbage value when the Get Device Flags command fails.
please add a Fixes: tag here.
Regards
Marcel