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

Commit 16391ea1 authored by Ajay Panicker's avatar Ajay Panicker Committed by android-build-merger
Browse files

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

am: b7164679

Change-Id: I33c322e779758c9d4806701408e8949a0fd233d4
parents 83a5a4fb b7164679
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@
#include "avrc_defs.h"
#include "avrc_int.h"
#include "bt_common.h"
#include "log/log.h"

/*****************************************************************************
 *  Global data
@@ -158,6 +159,12 @@ static tAVRC_STS avrc_pars_vendor_cmd(tAVRC_MSG_VENDOR* p_msg,
        status = AVRC_STS_INTERNAL_ERR;
        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;
      for (xx = 0, yy = 0; xx < p_result->get_cur_app_val.num_attr; xx++) {
        /* only report the valid player app attributes */