提交 dd625558 编写于 作者: M Marcel Holtmann 提交者: Johan Hedberg

Bluetooth: Add BUILD_BUG_ON for size of struct sockaddr_l2

This adds an extra check for ensuring that the size of sockaddr_l2
does not grow larger than sockaddr.
Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
上级 b0a8e282
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册