From 644f250acd25ef47950c39349eea6fbfbdd41c14 Mon Sep 17 00:00:00 2001
From: Brian Delwiche <delwiche@google.com>
Date: Sat, 6 Aug 2022 02:39:12 +0000
Subject: [PATCH] Add missing increment in bnep_api.cc

Bug: 228450451
Test: manual, pair BT and play audio
Tag: #security
Ignore-AOSP-First: Security
Change-Id: I3e832a8a438c6a7264eb7f2b65eacc717baf4db9
---
 system/stack/bnep/bnep_api.cc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/system/stack/bnep/bnep_api.cc b/system/stack/bnep/bnep_api.cc
index ec35dcce416..fb2f9471603 100644
--- a/system/stack/bnep/bnep_api.cc
+++ b/system/stack/bnep/bnep_api.cc
@@ -263,6 +263,7 @@ tBNEP_RESULT BNEP_ConnectResp(uint16_t handle, tBNEP_RESULT resp) {
     p = (uint8_t*)(p_bcb->p_pending_data + 1) + p_bcb->p_pending_data->offset;
     while (extension_present && p && rem_len) {
       ext_type = *p++;
+      rem_len--;
       extension_present = ext_type >> 7;
       ext_type &= 0x7F;
 
-- 
GitLab