DivestOS/Patches/LineageOS-14.1/android_system_bt/242134.patch

26 lines
966 B
Diff
Raw Normal View History

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: cprhokie <cprhokie@gmail.com>
Date: Fri, 22 Feb 2019 20:53:12 -0500
Subject: [PATCH] avrc_bld_get_attrs_rsp - fix attribute length position off by
one
Change-Id: I60c859ef9784cf39d390a22810be5777e1e5066c
---
stack/avrc/avrc_bld_tg.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/stack/avrc/avrc_bld_tg.c b/stack/avrc/avrc_bld_tg.c
index 5befa7a10..b73393182 100644
--- a/stack/avrc/avrc_bld_tg.c
+++ b/stack/avrc/avrc_bld_tg.c
@@ -976,7 +976,8 @@ static tAVRC_STS avrc_bld_get_attrs_rsp (tAVRC_GET_ATTRS_RSP *p_rsp, BT_HDR *p_p
}
/* get the existing length, if any, and also the num attributes */
p_start = (uint8_t *)(p_pkt + 1) + p_pkt->offset;
- p_data = p_len = p_start + 1; /* pdu */
+ p_data = p_start + 1; /* pdu */
+ p_len = p_start + 2;
/* the existing len */
BE_STREAM_TO_UINT16(len, p_data);
p_num = p_data + 1;