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

Commit bf62a652 authored by Kyunglyul Hyun's avatar Kyunglyul Hyun
Browse files

Handle no service engine clcb

When clcb is not found, return instead of
accessing out of bound memory.

Flag: EXEMPT, out of bound check
Bug: 180418988
Test: m -j;
Ignore-AOSP-First: security issue

Change-Id: I2373d79ce8a6307197764202e77445669f24af7e
parent da3eb99b
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -238,6 +238,10 @@ static void srvc_eng_s_request_cback(uint16_t conn_id, uint32_t trans_id,
  tGATTS_RSP rsp_msg;
  uint8_t act = SRVC_ACT_IGNORE;
  uint8_t clcb_idx = srvc_eng_find_clcb_idx_by_conn_id(conn_id);
  if (clcb_idx == SRVC_MAX_APPS) {
    log::error("Can't find clcb, id:{}", conn_id);
    return;
  }

  log::verbose("srvc_eng_s_request_cback : recv type (0x{:02x})", type);