summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2023-03-24 02:29:58 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2023-03-24 02:30:02 -0700
commit394f92c0cacbcfcd4724f9bc23991a3cc654737d (patch)
tree135d05e05d162646d34802358fdcfeca82f44d23
parent3d726f70379ed2a4dc2e0db51de352f65de2b9ff (diff)
parentdfcfdc4ea741fe628ff331cd53ceef06b65bc74c (diff)
Merge "btif: Fixing OOB KW Violation." into bt-sys.lnx.13.0.r1-rel
-rw-r--r--btif/src/btif_rc.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/btif/src/btif_rc.cc b/btif/src/btif_rc.cc
index a15b63c87..650f69b54 100644
--- a/btif/src/btif_rc.cc
+++ b/btif/src/btif_rc.cc
@@ -5145,6 +5145,12 @@ static void handle_app_attr_val_txt_response(
}
p_app_settings->ext_val_index++;
+ if (p_app_settings->ext_val_index >= AVRC_MAX_APP_ATTR_SIZE) {
+ BTIF_TRACE_ERROR("%s: ext_val_index is 0x%02x, overflow!",
+ __func__, p_app_settings->ext_val_index);
+ return;
+ }
+
if (p_app_settings->ext_val_index < p_app_settings->num_ext_attrs) {
attr_index = p_app_settings->ext_val_index;
for (xx = 0; xx < p_app_settings->ext_attrs[attr_index].num_val && xx < AVRC_MAX_APP_ATTR_SIZE; xx++) {