[PATCH BlueZ v2 4/5] bap: Fix possible crash with Broadcast Sink

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

If the remote terminates the BIG Sync the following crash is observed:

Process terminating with default action of signal 11 (SIGSEGV)
 Access not within mapped region at address 0x8
   at 0x40781C6: setup_free (bap.c:1024)
   by 0x4078EB8: bap_state_bcast_sink (bap.c:3118)
   by 0x41319DF: bap_bcast_set_state (bap.c:2392)
   by 0x412CFFC: stream_set_state (bap.c:1537)
   by 0x4131CBA: stream_io_disconnected (bap.c:6597)
   by 0x414A079: watch_callback (io-glib.c:173)
   by 0x4149EE9: io_err_watch_dispatch (io-glib.c:380)
   by 0x4C9587F: ??? (in /usr/lib64/libglib-2.0.so.0.8400.3)
   by 0x4C9E7C7: ??? (in /usr/lib64/libglib-2.0.so.0.8400.3)
   by 0x4C9EA6E: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.8400.3)
   by 0x414ABED: mainloop_run (mainloop-glib.c:65)
   by 0x414B1C4: mainloop_run_with_signal (mainloop-notify.c:196)
---
 profiles/audio/bap.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/profiles/audio/bap.c b/profiles/audio/bap.c
index d90d39bdc134..3dc4cd92e9ac 100644
--- a/profiles/audio/bap.c
+++ b/profiles/audio/bap.c
@@ -1021,7 +1021,8 @@ static void setup_free(void *data)
 
 	release_stream(setup->stream);
 
-	bap_update_cigs(setup->ep->data);
+	if (setup->ep)
+		bap_update_cigs(setup->ep->data);
 
 	free(setup);
 }
-- 
2.50.1





[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux