OSDN Git Service

Fix crash when remote connects to AVRCP without having a record
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Wed, 5 Oct 2011 14:24:50 +0000 (17:24 +0300)
committerJohan Hedberg <johan.hedberg@intel.com>
Wed, 5 Oct 2011 14:08:57 +0000 (17:08 +0300)
commit90c9c7bb13bab25dbdaf3e5051ce412ed3e84dfb
tree279d5d61a0831bbc9c594121f61eaaffdf316730
parent2d4c58a7600c96033be71344bbe63fa74df0a21d
Fix crash when remote connects to AVRCP without having a record

Device object may exist but control wont be initialized causing the
following crash:

Invalid read of size 8
   at 0x12B510: state_changed (control.c:90)
   by 0x12BA20: avctp_set_state (avctp.c:367)
   by 0x12C0DC: avctp_confirm_cb (avctp.c:733)
   by 0x166481: server_cb (btio.c:200)
   by 0x4E75ADC: g_main_context_dispatch (in /lib64/libglib-2.0.so.0.3000.0)
   by 0x4E762D7: ??? (in /lib64/libglib-2.0.so.0.3000.0)
   by 0x4E76824: g_main_loop_run (in /lib64/libglib-2.0.so.0.3000.0)
   by 0x11ED19: main (main.c:473)
 Address 0x8 is not stack'd, malloc'd or (recently) free'd
audio/avctp.c