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

Commit 303aa9ff authored by Jakub Pawlowski's avatar Jakub Pawlowski Committed by android-build-merger
Browse files

Merge "Decrease length after reading from array in process_service_attr_req"...

Merge "Decrease length after reading from array in process_service_attr_req" into oc-dev am: 2c19354f am: 86efeea8
am: f8c9022d

Change-Id: Id6152ac454552e852bdb4a87c90c7a7bb78778e4
parents b772c96a f8c9022d
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -333,9 +333,11 @@ static void process_service_attr_req(tCONN_CB* p_ccb, uint16_t trans_num,

  /* Extract the record handle */
  BE_STREAM_TO_UINT32(rec_handle, p_req);
  param_len -= sizeof(rec_handle);

  /* Get the max list length we can send. Cap it at MTU size minus overhead */
  BE_STREAM_TO_UINT16(max_list_len, p_req);
  param_len -= sizeof(max_list_len);

  if (max_list_len > (p_ccb->rem_mtu_size - SDP_MAX_ATTR_RSPHDR_LEN))
    max_list_len = p_ccb->rem_mtu_size - SDP_MAX_ATTR_RSPHDR_LEN;