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:
b0a8e28
)
Bluetooth: Add BUILD_BUG_ON for size of struct sockaddr_l2
author
Marcel Holtmann
<marcel@holtmann.org>
Sun, 11 Jan 2015 23:18:19 +0000
(15:18 -0800)
committer
Johan Hedberg
<johan.hedberg@intel.com>
Mon, 12 Jan 2015 09:24:19 +0000
(11:24 +0200)
This adds an extra check for ensuring that the size of sockaddr_l2
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/l2cap_sock.c
patch
|
blob
|
history
diff --git
a/net/bluetooth/l2cap_sock.c
b/net/bluetooth/l2cap_sock.c
index
f65caf4
..
20206cd
100644
(file)
--- a/
net/bluetooth/l2cap_sock.c
+++ b/
net/bluetooth/l2cap_sock.c
@@
-1614,6
+1614,8
@@
int __init l2cap_init_sockets(void)
{
int err;
+ BUILD_BUG_ON(sizeof(struct sockaddr_l2) > sizeof(struct sockaddr));
+
err = proto_register(&l2cap_proto, 0);
if (err < 0)
return err;