From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH BlueZ] audio/AVRCP: Fix sending invalid response to GetCapabilities
Date: Tue, 28 Jan 2014 12:05:34 -0800 [thread overview]
Message-ID: <1390939534-15699-1-git-send-email-luiz.dentz@gmail.com> (raw)
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
The attribute count has to be initialized with 0 since we reuse the same
buffer for both command and responses it may be already be set causing
invalid response to be generated.
---
profiles/audio/avrcp.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/profiles/audio/avrcp.c b/profiles/audio/avrcp.c
index 59a966e..ad5dc34 100644
--- a/profiles/audio/avrcp.c
+++ b/profiles/audio/avrcp.c
@@ -921,6 +921,7 @@ static uint8_t avrcp_handle_get_capabilities(struct avrcp *session,
return AVC_CTYPE_STABLE;
case CAP_EVENTS_SUPPORTED:
+ pdu->params[1] = 0;
for (i = 1; i <= AVRCP_EVENT_LAST; i++) {
if (session->supported_events & (1 << i)) {
pdu->params[1]++;
--
1.8.4.2
next reply other threads:[~2014-01-28 20:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-28 20:05 Luiz Augusto von Dentz [this message]
2014-01-29 17:07 ` [PATCH BlueZ] audio/AVRCP: Fix sending invalid response to GetCapabilities Luiz Augusto von Dentz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1390939534-15699-1-git-send-email-luiz.dentz@gmail.com \
--to=luiz.dentz@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox