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:
74b3fb8
)
Bluetooth: Add BUILD_BUG_ON for size of struct sockaddr_sco
author
Marcel Holtmann
<marcel@holtmann.org>
Sun, 11 Jan 2015 23:21:06 +0000
(15:21 -0800)
committer
Johan Hedberg
<johan.hedberg@intel.com>
Mon, 12 Jan 2015 09:24:24 +0000
(11:24 +0200)
This adds an extra check for ensuring that the size of sockaddr_sco
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/sco.c
patch
|
blob
|
blame
|
history
diff --git
a/net/bluetooth/sco.c
b/net/bluetooth/sco.c
index 30e5ea3f1ad311388bf7f95aec8f70cb88e8fab9..07ec7d23b843d7c18a866472e7451e1f279bfcf0 100644
(file)
--- a/
net/bluetooth/sco.c
+++ b/
net/bluetooth/sco.c
@@
-1184,6
+1184,8
@@
int __init sco_init(void)
{
int err;
+ BUILD_BUG_ON(sizeof(struct sockaddr_sco) > sizeof(struct sockaddr));
+
err = proto_register(&sco_proto, 0);
if (err < 0)
return err;