Thread (2 messages) 2 messages, 1 author, 2016-03-23

Re: [PATCH BlueZ] audio/avrcp: Fix crash when connecting to controllers

flat view

From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Date: 2016-03-23 13:33:43

Hi,

On Tue, Mar 22, 2016 at 5:44 PM, Luiz Augusto von Dentz
[off-list ref] wrote:
quoted hunk ↗ jump to hunk
From: Luiz Augusto von Dentz <redacted>

Patch 70fdb77d0af137aa859f267da976f610cd9bbbd2 has actually caused the
following regression since no player is set:

Invalid read of size 8
  at 0x435B8E: avrcp_player_value_rsp (avrcp.c:2150)
  by 0x42FB83: control_response (avctp.c:831)
  by 0x42FB83: session_cb (avctp.c:996)
  by 0x50C8E39: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.4600.2)
  by 0x50C91CF: ??? (in /usr/lib64/libglib-2.0.so.0.4600.2)
  by 0x50C94F1: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.4600.2)
  by 0x40C258: main (main.c:687)
Address 0x58 is not stack'd, malloc'd or (recently) free'd
---
 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 787643c..0c6279a 100644
--- a/profiles/audio/avrcp.c
+++ b/profiles/audio/avrcp.c
@@ -3656,7 +3656,7 @@ static gboolean avrcp_get_capabilities_resp(struct avctp *conn,
                }
        }

-       if (!session->controller)
+       if (!session->controller || !session->controller->player)
                return FALSE;

        if (!(events & (1 << AVRCP_EVENT_SETTINGS_CHANGED)))
--
2.5.0
Applied.


-- 
Luiz Augusto von Dentz
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help