Skip to content

Commit

Permalink
Bluetooth: Classic: GAP: Initialize EIR buf to 0
Browse files Browse the repository at this point in the history
bug: v/52788

Signed-off-by: fangzhenwei <fangzhenwei@xiaomi.com>
  • Loading branch information
Frozen935 committed Jan 23, 2025
1 parent 8d7294f commit c2aca0c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion subsys/bluetooth/host/classic/br.c
Original file line number Diff line number Diff line change
Expand Up @@ -1305,6 +1305,7 @@ int bt_br_write_ext_inq_response(uint8_t fec_required)
struct bt_hci_cp_write_extended_inquiry_response *cp;
size_t name_len, eir_len = 240;
uint8_t type;
void *p;

if (!BT_FEAT_EIR(bt_dev.features)) {
return -ENOTSUP;
Expand Down Expand Up @@ -1339,7 +1340,8 @@ int bt_br_write_ext_inq_response(uint8_t fec_required)
/* TODO: Fill in EIR data (Manufacturer Specific Data) */
/* TODO: Fill in EIR data (TX Power) */

net_buf_add(buf, eir_len);
p = net_buf_add(buf, eir_len);
memset(p, 0, eir_len);

return bt_hci_cmd_send_sync(BT_HCI_OP_WRITE_EXTENDED_INQUIRY_RESPONSE, buf, NULL);
}
Expand Down

0 comments on commit c2aca0c

Please sign in to comment.