Bluetooth: SDP: Check params validness
Validates user driven bt_sdp_discover_params data. Jira: ZEP-1112 Change-Id: I7d560f80df80708906d91e541385ddf804bfdeb6 Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
This commit is contained in:
parent
b04f3a2b17
commit
fe7d3392cd
1 changed files with 5 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue