OSDN Git Service
(root)
/
uclinux-h8
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
29fb608
)
Bluetooth: assign len after null check
author
Wang Qing
<wangqing@vivo.com>
Tue, 15 Feb 2022 02:01:56 +0000
(18:01 -0800)
committer
Marcel Holtmann
<marcel@holtmann.org>
Thu, 24 Feb 2022 20:05:21 +0000
(21:05 +0100)
len should be assigned after a null check
Signed-off-by: Wang Qing <wangqing@vivo.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/mgmt_util.c
patch
|
blob
|
history
diff --git
a/net/bluetooth/mgmt_util.c
b/net/bluetooth/mgmt_util.c
index
edee60b
..
37eef2c
100644
(file)
--- a/
net/bluetooth/mgmt_util.c
+++ b/
net/bluetooth/mgmt_util.c
@@
-77,11
+77,12
@@
int mgmt_send_event_skb(unsigned short channel, struct sk_buff *skb, int flag,
{
struct hci_dev *hdev;
struct mgmt_hdr *hdr;
- int len
= skb->len
;
+ int len;
if (!skb)
return -EINVAL;
+ len = skb->len;
hdev = bt_cb(skb)->mgmt.hdev;
/* Time stamp */