Parent: f21c36ab2b202474de37c8f720f2e6a0dede350c
Author: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Committer: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: 2016-07-29 14:12:49
Tree: 818bb10a25c3b9560ebaf4f5b44c4fd0eef07d22
lib/uuid: Fix using unitialized values The strings passed to bt_uuid_strcmp may not be valid UUIDs so the return of bt_string_to_uuid needs to be checked otherwise bt_uuid_cmp may attempt to access unitialized values: Conditional jump or move depends on uninitialised value(s) at 0x4C1D4D: bt_uuid_to_uuid128 (uuid.c:78) by 0x4C1F22: bt_uuid_cmp (uuid.c:131) by 0x4C24A8: bt_uuid_strcmp (uuid.c:286) by 0x40F8A8: reconnect_match (policy.c:514) by 0x40F8A8: service_cb (policy.c:655) by 0x499331: change_state (service.c:109) by 0x499BBB: btd_service_connecting_complete (service.c:361) by 0x4178C1: stream_state_changed (source.c:163) by 0x422C78: avdtp_sep_set_state (avdtp.c:1013) by 0x42372A: handle_transport_connect (avdtp.c:844) by 0x423D8B: avdtp_connect_cb (avdtp.c:2326) by 0x465BBB: connect_cb (btio.c:232) by 0x50CA702: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.4800.1) Uninitialised value was created by a stack allocation at 0x4C2460: bt_uuid_strcmp (uuid.c:280)
Diffstat
| M | lib/uuid.c | | | 7 | +++++- - |
1 files changed, 5 insertions(+), 2 deletions(-)