linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH BlueZ 01/15] AVRCP: Fix crash when registering unsupported notification
@ 2013-06-10 10:36 Luiz Augusto von Dentz
  2013-06-10 10:36 ` [PATCH BlueZ 02/15] AVCTP: Fix coding style Luiz Augusto von Dentz
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: Luiz Augusto von Dentz @ 2013-06-10 10:36 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

Reject command if notification is not supported otherwise this can
cause crashes.
---
 profiles/audio/avrcp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/profiles/audio/avrcp.c b/profiles/audio/avrcp.c
index 4558407..5bddd08 100644
--- a/profiles/audio/avrcp.c
+++ b/profiles/audio/avrcp.c
@@ -1355,7 +1355,7 @@ static uint8_t avrcp_handle_register_notification(struct avrcp *session,
 	 * one is applicable only for EVENT_PLAYBACK_POS_CHANGED. See AVRCP
 	 * 1.3 spec, section 5.4.2.
 	 */
-	if (len != 5)
+	if (len != 5 || !(session->supported_events & (1 << pdu->params[0])))
 		goto err;
 
 	switch (pdu->params[0]) {
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2013-06-11 21:16 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-10 10:36 [PATCH BlueZ 01/15] AVRCP: Fix crash when registering unsupported notification Luiz Augusto von Dentz
2013-06-10 10:36 ` [PATCH BlueZ 02/15] AVCTP: Fix coding style Luiz Augusto von Dentz
2013-06-10 10:36 ` [PATCH BlueZ 03/15] AVCTP: Call callback in case the request timeout Luiz Augusto von Dentz
2013-06-10 10:36 ` [PATCH BlueZ 04/15] AVRCP: Fix crash while listing available settings in TG role Luiz Augusto von Dentz
2013-06-10 10:37 ` [PATCH BlueZ 05/15] AVRCP: Add additional protocol discriptor list for Browsing channel Luiz Augusto von Dentz
2013-06-10 10:37 ` [PATCH BlueZ 06/15] AVRCP: Fix crash when current addressed player is removed Luiz Augusto von Dentz
2013-06-10 10:37 ` [PATCH BlueZ 07/15] AVRCP: Fix crash if player status is NULL Luiz Augusto von Dentz
2013-06-10 10:37 ` [PATCH BlueZ 08/15] AVRCP: Fix setting reserved bit in GetCapabilities response Luiz Augusto von Dentz
2013-06-10 10:37 ` [PATCH BlueZ 09/15] AVRCP: Fix crash when connecting role without a record Luiz Augusto von Dentz
2013-06-10 10:37 ` [PATCH BlueZ 10/15] AVRCP: Fix crash while setting player volume Luiz Augusto von Dentz
2013-06-10 10:37 ` [PATCH BlueZ 11/15] core: Fix not been able to cancel Device.Connect with Device.Disconnect Luiz Augusto von Dentz
2013-06-10 10:37 ` [PATCH BlueZ 12/15] AVRCP: Fix sending invalid attributes when responding to GetElementAttributes Luiz Augusto von Dentz
2013-06-10 10:37 ` [PATCH BlueZ 13/15] AVRCP: Fix sending SetPlayerApplicationSettingValue using notify command type Luiz Augusto von Dentz
2013-06-10 10:37 ` [PATCH BlueZ 14/15] obexd: Fix crash when resetting OPP session without a transfer Luiz Augusto von Dentz
2013-06-10 10:37 ` [PATCH BlueZ 15/15] obexd: Fix not checking for valid fd on NewConnection Luiz Augusto von Dentz
2013-06-11 21:16 ` [PATCH BlueZ 01/15] AVRCP: Fix crash when registering unsupported notification Luiz Augusto von Dentz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).