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

Commit a5cb4b5b authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Fix potential OOB write in libbluetooth" into oc-dev am: 1f485714

Original change: https://googleplex-android-review.googlesource.com/c/platform/system/bt/+/12781555

Change-Id: I905bd02ad475b238005d0589a1c0171d842d7201
parents 3f47fe7e 1f485714
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -302,6 +302,13 @@ static tAVRC_STS avrc_pars_vendor_cmd(tAVRC_MSG_VENDOR* p_msg,
        status = AVRC_STS_INTERNAL_ERR;
      else {
        BE_STREAM_TO_UINT8(p_result->reg_notif.event_id, p);
        if (!AVRC_IS_VALID_EVENT_ID(p_result->reg_notif.event_id)) {
          android_errorWriteLog(0x534e4554, "168802990");
          AVRC_TRACE_ERROR("%s: Invalid event id: %d", __func__,
                           p_result->reg_notif.event_id);
          return AVRC_STS_BAD_PARAM;
        }

        BE_STREAM_TO_UINT32(p_result->reg_notif.param, p);
      }
      break;