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

Commit 38e6b60d authored by Hui Peng's avatar Hui Peng Committed by Automerger Merge Worker
Browse files

Merge "Fix an OOB bug in register_notification_rsp" into tm-dev am: e2418045...

Merge "Fix an OOB bug in register_notification_rsp" into tm-dev am: e2418045 am: 80f137fa am: 6cfae0a5

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/20995769



Change-Id: I8fa7e209a4733633022c0e0e005eb481e8618b55
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 80b09946 6cfae0a5
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1959,6 +1959,11 @@ static bt_status_t register_notification_rsp(
                   dump_rc_notification_event_id(event_id));
  std::unique_lock<std::mutex> lock(btif_rc_cb.lock);

  if (event_id > MAX_RC_NOTIFICATIONS) {
    BTIF_TRACE_ERROR("Invalid event id");
    return BT_STATUS_PARM_INVALID;
  }

  memset(&(avrc_rsp.reg_notif), 0, sizeof(tAVRC_REG_NOTIF_RSP));

  avrc_rsp.reg_notif.event_id = event_id;