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

Commit 674690df authored by Ajay Panicker's avatar Ajay Panicker Committed by android-build-merger
Browse files

Merge "AVRCP: Check number of text attributes in response" into oc-dev am:...

Merge "AVRCP: Check number of text attributes in response" into oc-dev am: 41b81870 am: 38d2d3c2 am: c5a52083
am: 23c5e32a

Change-Id: Ifaca4ffbd6548634eee23ab2600b5bf0cb90f2c2
parents 8c42f0ca 23c5e32a
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@
#include "avrc_int.h"
#include "bt_common.h"
#include "bt_utils.h"
#include "log/log.h"
#include "osi/include/osi.h"

/*****************************************************************************
@@ -457,6 +458,12 @@ static tAVRC_STS avrc_ctrl_pars_vendor_rsp(tAVRC_MSG_VENDOR* p_msg,
      BE_STREAM_TO_UINT8(p_result->list_app_attr.num_attr, p);
      AVRC_TRACE_DEBUG("%s attr count = %d ", __func__,
                       p_result->list_app_attr.num_attr);

      if (p_result->list_app_attr.num_attr > AVRC_MAX_APP_ATTR_SIZE) {
        android_errorWriteLog(0x534e4554, "63146237");
        p_result->list_app_attr.num_attr = AVRC_MAX_APP_ATTR_SIZE;
      }

      for (int xx = 0; xx < p_result->list_app_attr.num_attr; xx++) {
        BE_STREAM_TO_UINT8(p_result->list_app_attr.attrs[xx], p);
      }