diff options
author | Loic Poulain <loic.poulain@intel.com> | 2015-09-02 13:04:14 +0300 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2015-09-17 14:20:02 +0300 |
commit | 1b1975749f856946f716180ca94db52fb1ae3500 (patch) | |
tree | 8f6d21b99eeff545c16defee7fa31f4ecc55291a /drivers/bluetooth/hci_intel.c | |
parent | 74cdad37cd2410c5cec2160d031e04577948aff0 (diff) |
Bluetooth: hci_intel: Show error in case of invalid LPM packet size
Don't hide this packet size error.
Signed-off-by: Loic Poulain <loic.poulain@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'drivers/bluetooth/hci_intel.c')
-rw-r--r-- | drivers/bluetooth/hci_intel.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/bluetooth/hci_intel.c b/drivers/bluetooth/hci_intel.c index 9fd1143bc78f..b4dc3c5b3841 100644 --- a/drivers/bluetooth/hci_intel.c +++ b/drivers/bluetooth/hci_intel.c @@ -1010,8 +1010,11 @@ static int intel_recv_lpm(struct hci_dev *hdev, struct sk_buff *skb) switch (lpm->opcode) { case LPM_OP_TX_NOTIFY: - if (lpm->dlen) - intel_recv_lpm_notify(hdev, lpm->data[0]); + if (lpm->dlen < 1) { + bt_dev_err(hu->hdev, "Invalid LPM notification packet"); + break; + } + intel_recv_lpm_notify(hdev, lpm->data[0]); break; case LPM_OP_SUSPEND_ACK: set_bit(STATE_SUSPENDED, &intel->flags); |