OSDN Git Service

Allocated requested buffer size in SDP attribute request
authorSrinu Jella <sjella@codeaurora.org>
Mon, 22 Dec 2014 14:16:28 +0000 (19:46 +0530)
committerAndre Eisenbach <eisenbach@google.com>
Tue, 23 Jun 2015 21:29:20 +0000 (14:29 -0700)
commitc0532307d35ac86f5427243809f2c98b4fd8cacd
tree5e813af126797782f305a78d26310d92b231eea4
parenta3dbe938e519dfbdbfd121b8d7a8473cccfd3e70
Allocated requested buffer size in SDP attribute request

Use case: Allocated required GKI buf in sdp attr req

1. Enter UUID - 0100 for L2CAP or 110C for AVRCP Target so DUT sends
   continuation frame for TSPX_sdp_service_search_pattern on PTS
2. Start Test case TP/SSA/BV-06 in PTSv6.0

Failure: Some PTS test cases request less attributes in first packet
and request more attributes in continuation packets.
As stack allocates the buf in start packet and using the same
buf in continuation packets, it's causing buffer corruption and crash

Root cause: Buffer allocated for start packet is not sufficient
in continuation packets

Fix: Fixing this issue by dynamically allocating buffer in continuation
packets of service_search_attr_req and service_attr_req

Bug: 21896912
Change-Id: I8daeffb7d6486c7b916ad2f0505ad422d91a613c
stack/sdp/sdp_server.c