OSDN Git Service

Fix how add_sdp_by_uuid passes the uuid to SDP_AddSequence
authorZach Johnson <zachoverflow@google.com>
Tue, 16 Sep 2014 05:29:54 +0000 (22:29 -0700)
committerAndre Eisenbach <eisenbach@google.com>
Mon, 16 Mar 2015 23:51:38 +0000 (16:51 -0700)
commitad7c19ea9a164c3f7ebe3786114c5d98870eee05
treedbff71dabf993eaf778899fe11be2f1844a88bbe
parent75b22fd55f44923054b411cc7cd2ca312e6fca9e
Fix how add_sdp_by_uuid passes the uuid to SDP_AddSequence

SDP_AddSequence expects to dereference the passed
pointer and find a pointer there, and that pointer
pointing to UINT8s.

Before, we were passing &type_buf, which gives the
address of the first UINT8 in the array on the stack.
This meant SDP_AddSequence was treating the first few
bytes of the uuid as a pointer to somewhere, leading
to a segfault when it tried to follow it.
btif/src/btif_sock_sdp.c