aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Pawlowski <jpawlowski@google.com>2020-09-22 22:01:26 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-09-22 22:01:26 +0000
commit7b90b1ecc4c772348e385999d96eb3a35245e70f (patch)
tree2f373fd358cf63aa658a8780d8865d2b09d687d1
parent167cff54c8ebd2a00e3cdd7a55423b71fd1419c4 (diff)
parent6d0b29e31710fed6b62f0aba38ddf813735637d4 (diff)
downloadbt-7b90b1ecc4c772348e385999d96eb3a35245e70f.tar.gz
Merge "fix oob in avrc_ctrl_pars_vendor_cmd" into rvc-dev am: a6d074922e am: 6d0b29e317
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/bt/+/12628928 Change-Id: I9a7dc376bcc02c70501ea5a0b5d27d6e976cecbd
-rw-r--r--stack/avrc/avrc_pars_tg.cc2
1 files changed, 2 insertions, 0 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;