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

Commit 4b008a2a authored by Hui Peng's avatar Hui Peng
Browse files

Fix an OOB bug in btm_acl_process_sca_cmpl_pkt

Bug: 251427561
Test: manual
Ignore-AOSP-First: security

Change-Id: I2db2339631d521515cb34536e358ae72ebeaaa8b
parent f9f1695e
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -339,6 +339,11 @@ void btm_acl_process_sca_cmpl_pkt(uint8_t len, uint8_t* data) {
  uint8_t sca;
  uint8_t status;

  if (len < 4) {
    LOG_WARN("Malformatted packet, not containing enough data");
    return;
  }

  STREAM_TO_UINT8(status, data);

  if (status != HCI_SUCCESS) {