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

Commit c482299a authored by Ajay Panicker's avatar Ajay Panicker Committed by Android (Google) Code Review
Browse files

Merge "AVRCP: Check the number of text attributes requested" into oc-dev

parents d7044b04 e100163b
Loading
Loading
Loading
Loading
+7 −0
Original line number Original line Diff line number Diff line
@@ -21,6 +21,7 @@
#include "avrc_defs.h"
#include "avrc_defs.h"
#include "avrc_int.h"
#include "avrc_int.h"
#include "bt_common.h"
#include "bt_common.h"
#include "log/log.h"


/*****************************************************************************
/*****************************************************************************
 *  Global data
 *  Global data
@@ -158,6 +159,12 @@ static tAVRC_STS avrc_pars_vendor_cmd(tAVRC_MSG_VENDOR* p_msg,
        status = AVRC_STS_INTERNAL_ERR;
        status = AVRC_STS_INTERNAL_ERR;
        break;
        break;
      }
      }

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

      p_u8 = p_result->get_cur_app_val.attrs;
      p_u8 = p_result->get_cur_app_val.attrs;
      for (xx = 0, yy = 0; xx < p_result->get_cur_app_val.num_attr; xx++) {
      for (xx = 0, yy = 0; xx < p_result->get_cur_app_val.num_attr; xx++) {
        /* only report the valid player app attributes */
        /* only report the valid player app attributes */