projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1904a85
)
Bluetooth: Add BUILD_BUG_ON for size of struct sockaddr_hci
author
Marcel Holtmann
<marcel@holtmann.org>
Sun, 11 Jan 2015 23:18:17 +0000
(15:18 -0800)
committer
Johan Hedberg
<johan.hedberg@intel.com>
Mon, 12 Jan 2015 09:24:16 +0000
(11:24 +0200)
This adds an extra check for ensuring that the size of sockaddr_hci
does not grow larger than sockaddr.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
net/bluetooth/hci_sock.c
patch
|
blob
|
blame
|
history
diff --git
a/net/bluetooth/hci_sock.c
b/net/bluetooth/hci_sock.c
index 2c245fdf319a60022328e8f3918251db526f88f8..e176a988625ec41241ff8b4fe70d89ee1fda0257 100644
(file)
--- a/
net/bluetooth/hci_sock.c
+++ b/
net/bluetooth/hci_sock.c
@@
-1230,6
+1230,8
@@
int __init hci_sock_init(void)
{
int err;
+ BUILD_BUG_ON(sizeof(struct sockaddr_hci) > sizeof(struct sockaddr));
+
err = proto_register(&hci_sk_proto, 0);
if (err < 0)
return err;