projects
/
GitHub
/
exynos8895
/
android_kernel_samsung_universal8895.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c68fb7f
)
Bluetooth: Allow for NULL data in mgmt_pending_add
author
Szymon Janc
<szymon.janc@tieto.com>
Tue, 22 Mar 2011 12:12:20 +0000
(13:12 +0100)
committer
Gustavo F. Padovan
<padovan@profusion.mobi>
Thu, 31 Mar 2011 17:22:57 +0000
(14:22 -0300)
Since index is in mgmt_hdr it is possible to have mgmt command with
no parameters that still needs to add itself to pending list.
Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
net/bluetooth/mgmt.c
patch
|
blob
|
blame
|
history
diff --git
a/net/bluetooth/mgmt.c
b/net/bluetooth/mgmt.c
index d0c01230bba929b5bee5beff7f3b146955a00505..93f0f04c8bcdce1053739f9e12c497dce8c44596 100644
(file)
--- a/
net/bluetooth/mgmt.c
+++ b/
net/bluetooth/mgmt.c
@@
-239,7
+239,8
@@
static struct pending_cmd *mgmt_pending_add(struct sock *sk, u16 opcode,
return NULL;
}
- memcpy(cmd->param, data, len);
+ if (data)
+ memcpy(cmd->param, data, len);
cmd->sk = sk;
sock_hold(sk);