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

Commit 09f02238 authored by Hui Peng's avatar Hui Peng Committed by Automerger Merge Worker
Browse files

Fix an OOB bug in on_iso_link_quality_read am: f7679c19

parents 695d4eab f7679c19
Loading
Loading
Loading
Loading
+7 −0
Original line number Original line Diff line number Diff line
@@ -354,6 +354,13 @@ struct iso_impl {
    uint32_t rxUnreceivedPackets;
    uint32_t rxUnreceivedPackets;
    uint32_t duplicatePackets;
    uint32_t duplicatePackets;


    // 1 + 2 + 4 * 7
#define ISO_LINK_QUALITY_SIZE 31
    if (len < ISO_LINK_QUALITY_SIZE) {
      LOG(ERROR) << "Malformated link quality format, len=" << len;
      return;
    }

    STREAM_TO_UINT8(status, stream);
    STREAM_TO_UINT8(status, stream);
    if (status != HCI_SUCCESS) {
    if (status != HCI_SUCCESS) {
      LOG(ERROR) << "Failed to Read ISO Link Quality, status: "
      LOG(ERROR) << "Failed to Read ISO Link Quality, status: "