Skip to content

Bluetooth: SDP: fix sdp record not uninitialized #93331

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions subsys/bluetooth/host/classic/sdp.c
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,7 @@ static uint16_t sdp_svc_search_req(struct bt_sdp *sdp, struct net_buf *buf,
uint8_t cont_state_size, cont_state = 0U, idx = 0U, count = 0U;
bool pkt_full = false;

memset(matching_recs, 0, sizeof(matching_recs));
res = find_services(buf, matching_recs);
if (res) {
/* Error in parsing */
Expand Down Expand Up @@ -1205,6 +1206,7 @@ static uint16_t sdp_svc_search_att_req(struct bt_sdp *sdp, struct net_buf *buf,
uint8_t cont_state_size, next_svc = 0U, next_att = 0U;
bool dry_run = false;

memset(matching_recs, 0, sizeof(matching_recs));
res = find_services(buf, matching_recs);
if (res) {
return res;
Expand Down
Loading