From 42154de5007f8da59f11ce327885172833d6ea36 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Wed, 5 Jun 2013 22:40:55 +0700 Subject: [PATCH] AVRCP: Fix crash while setting player volume Invalid read of size 8 at 0x41A4EA: avrcp_handle_set_volume (avrcp.c:3619) by 0x418598: session_cb (avctp.c:790) by 0x3F31A47A54: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.3400.2) by 0x3F31A47D87: ??? (in /usr/lib64/libglib-2.0.so.0.3400.2) by 0x3F31A48181: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.3400.2) by 0x40A335: main (main.c:595) Address 0x48 is not stack'd, malloc'd or (recently) free'd --- profiles/audio/avrcp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/profiles/audio/avrcp.c b/profiles/audio/avrcp.c index 01d6113b1..181bc387f 100644 --- a/profiles/audio/avrcp.c +++ b/profiles/audio/avrcp.c @@ -3258,7 +3258,8 @@ static gboolean avrcp_handle_set_volume(struct avctp *conn, volume = pdu->params[0] & 0x7F; - player->cb->set_volume(volume, session->dev, player->user_data); + if (player != NULL) + player->cb->set_volume(volume, session->dev, player->user_data); return FALSE; } -- 2.47.3