Skip to content

Commit

Permalink
Bluetooth: SDP: Check params validness
Browse files Browse the repository at this point in the history
Validates user driven bt_sdp_discover_params data.

Jira: ZEP-1112

Change-Id: I7d560f80df80708906d91e541385ddf804bfdeb6
Signed-off-by: Arkadiusz Lichwa <[email protected]>
  • Loading branch information
xpuarli authored and Johan Hedberg committed Dec 24, 2016
1 parent b04f3a2 commit fe7d339
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions subsys/bluetooth/host/sdp.c
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,11 @@ int bt_sdp_discover(struct bt_conn *conn,
{
struct bt_sdp_client *session;

if (!params || !params->uuid || !params->func || !params->pool) {
BT_WARN("Invalid user params");
return -EINVAL;
}

session = sdp_client_get_session(conn);
if (!session) {
return -ENOMEM;
Expand Down

0 comments on commit fe7d339

Please sign in to comment.