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

Commit deb55bd7 authored by Chen Chen's avatar Chen Chen
Browse files

Security: Fix out of bound write in HFP client

Bug: 224536184
Test: build
Tag: #security
Change-Id: I2e6d1ba0d2bbe8075f7b901553e808c7ce2ad76f
parent b90a87d8
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -333,6 +333,10 @@ static void bta_hf_client_handle_cind_list_item(tBTA_HF_CLIENT_CB* client_cb,

  APPL_TRACE_DEBUG("%s: %lu.%s <%lu:%lu>", __func__, index, name, min, max);

  if (index >= BTA_HF_CLIENT_AT_INDICATOR_COUNT) {
    return;
  }

  /* look for a matching indicator on list of supported ones */
  for (i = 0; i < BTA_HF_CLIENT_AT_SUPPORTED_INDICATOR_COUNT; i++) {
    if (strcmp(name, BTA_HF_CLIENT_INDICATOR_SERVICE) == 0) {