mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-11-29 15:14:31 +08:00
d9b27da3cc
Changing stream state from STREAMING to IDLE can be associated with side effects under some circumstances (such as terminating bluetoothd during music is streamed). In this case, after connection is lost, stream state changes from STREAMING to IDLE - "avdtp_sep_set_state" is triggered which invokes callback called "stream_state_changed" which internally invokes "avdtp_sep_set_state" (state of stream doesn't change and stays as IDLE) second time and then stream callbacks list is discarded by "stream_free" ("g_slist_free(stream->callbacks)"). After returning from callback, "stream->callbacks" list (and "l" pointer as well) is already out of date, so attempting to fetch "l->next" pointer (returned by "g_slist_next(l)" to be prepared to next iteration of "for" loop) from node on discarded list leads to invalid read issue (reported by valgrind). This patch prevents from this issue by moving "l = g_slist_next(l)" instruction just before invoking callback - loop has been modified and "while" used instead of "for" loop variant. |
||
---|---|---|
attrib | ||
audio | ||
btio | ||
compat | ||
cups | ||
doc | ||
gdbus | ||
health | ||
input | ||
lib | ||
network | ||
plugins | ||
sap | ||
sbc | ||
scripts | ||
serial | ||
src | ||
test | ||
tools | ||
tracer | ||
.gitignore | ||
.mailmap | ||
acinclude.m4 | ||
AUTHORS | ||
bluez.pc.in | ||
bootstrap | ||
bootstrap-configure | ||
ChangeLog | ||
configure.ac | ||
COPYING | ||
COPYING.LIB | ||
INSTALL | ||
Makefile.am | ||
Makefile.tools | ||
NEWS | ||
README | ||
TODO |
BlueZ - Bluetooth protocol stack for Linux ****************************************** Copyright (C) 2000-2001 Qualcomm Incorporated Copyright (C) 2002-2003 Maxim Krasnyansky <maxk@qualcomm.com> Copyright (C) 2002-2010 Marcel Holtmann <marcel@holtmann.org> Compilation and installation ============================ In order to compile Bluetooth utilities you need following software packages: - Linux Bluetooth protocol stack (BlueZ) - GCC compiler - D-Bus library - GLib library - USB library (optional) - Lexical Analyzer (flex, lex) - YACC (yacc, bison, byacc) To configure run: ./configure --prefix=/usr --mandir=/usr/share/man \ --sysconfdir=/etc --localstatedir=/var --libexecdir=/lib Configure automatically searches for all required components and packages. To compile and install run: make && make install Information =========== Mailing lists: linux-bluetooth@vger.kernel.org For additional information about the project visit BlueZ web site: http://www.bluez.org