aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2020-09-23 23:13:13 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2020-09-23 23:13:13 +0000
commit0608ef56499c38be7ac4f3668d8d7b264e7ab8d8 (patch)
tree03255bef9b4591f0c650b9cb84fd25ab0ab256db
parent261555353faad54b623af235c24ed7a82b989399 (diff)
parentb54a294f46dc06affbd76b7d404fd6157e17e260 (diff)
downloadbt-0608ef56499c38be7ac4f3668d8d7b264e7ab8d8.tar.gz
Snap for 6859016 from b54a294f46dc06affbd76b7d404fd6157e17e260 to rvc-qpr1-release
Change-Id: I5a66cb27d949d195b22848d20bc1d825cf87b5a4
-rw-r--r--stack/avrc/avrc_pars_tg.cc2
-rw-r--r--stack/smp/smp_br_main.cc3
2 files changed, 4 insertions, 1 deletions
diff --git a/stack/avrc/avrc_pars_tg.cc b/stack/avrc/avrc_pars_tg.cc
index fe1db3dbc..f2396b45e 100644
--- a/stack/avrc/avrc_pars_tg.cc
+++ b/stack/avrc/avrc_pars_tg.cc
@@ -71,6 +71,8 @@ static tAVRC_STS avrc_ctrl_pars_vendor_cmd(tAVRC_MSG_VENDOR* p_msg,
break;
}
case AVRC_PDU_REGISTER_NOTIFICATION: /* 0x31 */
+ if (len < 5) return AVRC_STS_INTERNAL_ERR;
+
BE_STREAM_TO_UINT8(p_result->reg_notif.event_id, p);
BE_STREAM_TO_UINT32(p_result->reg_notif.param, p);
break;
diff --git a/stack/smp/smp_br_main.cc b/stack/smp/smp_br_main.cc
index b06055fb5..2f5fe7636 100644
--- a/stack/smp/smp_br_main.cc
+++ b/stack/smp/smp_br_main.cc
@@ -303,7 +303,6 @@ void smp_br_state_machine_event(tSMP_CB* p_cb, tSMP_BR_EVENT event,
tSMP_BR_STATE curr_state = p_cb->br_state;
tSMP_BR_SM_TBL state_table;
uint8_t action, entry;
- tSMP_BR_ENTRY_TBL entry_table = smp_br_entry_table[p_cb->role];
SMP_TRACE_EVENT("main %s", __func__);
if (curr_state >= SMP_BR_STATE_MAX) {
@@ -317,6 +316,8 @@ void smp_br_state_machine_event(tSMP_CB* p_cb, tSMP_BR_EVENT event,
return;
}
+ tSMP_BR_ENTRY_TBL entry_table = smp_br_entry_table[p_cb->role];
+
SMP_TRACE_DEBUG("SMP Role: %s State: [%s (%d)], Event: [%s (%d)]",
(p_cb->role == HCI_ROLE_SLAVE) ? "Slave" : "Master",
smp_get_br_state_name(p_cb->br_state), p_cb->br_state,