diff --git a/[refs] b/[refs] index 97ab5d88da6a..2139257f17d3 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d97dcb66001222efa79e55f5260b9b660fd452a4 +refs/heads/master: c72d4b8afa8002cd6f64225954bee78296321e7e diff --git a/trunk/net/bluetooth/mgmt.c b/trunk/net/bluetooth/mgmt.c index 402cb0026f5d..f590dfbe9e07 100644 --- a/trunk/net/bluetooth/mgmt.c +++ b/trunk/net/bluetooth/mgmt.c @@ -2532,12 +2532,19 @@ static int set_device_id(struct sock *sk, struct hci_dev *hdev, void *data, { struct mgmt_cp_set_device_id *cp = data; int err; + __u16 source; BT_DBG("%s", hdev->name); + source = __le16_to_cpu(cp->source); + + if (source > 0x0002) + return cmd_status(sk, hdev->id, MGMT_OP_SET_DEVICE_ID, + MGMT_STATUS_INVALID_PARAMS); + hci_dev_lock(hdev); - hdev->devid_source = __le16_to_cpu(cp->source); + hdev->devid_source = source; hdev->devid_vendor = __le16_to_cpu(cp->vendor); hdev->devid_product = __le16_to_cpu(cp->product); hdev->devid_version = __le16_to_cpu(cp->version);