Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6ea547be authored by Brian Delwiche's avatar Brian Delwiche Committed by Automerger Merge Worker
Browse files

Add negative length check in process_service_search_rsp am: 96f108e8

parents b016b289 96f108e8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -280,7 +280,7 @@ static void process_service_search_rsp(tCONN_CB* p_ccb, uint8_t* p_reply,

  orig = p_ccb->num_handles;
  p_ccb->num_handles += cur_handles;
  if (p_ccb->num_handles == 0) {
  if (p_ccb->num_handles == 0 || p_ccb->num_handles < orig) {
    SDP_TRACE_WARNING("SDP - Rcvd ServiceSearchRsp, no matches");
    sdp_disconnect(p_ccb, SDP_NO_RECS_MATCH);
    return;