Commit b0a8e282 authored by Marcel Holtmann's avatar Marcel Holtmann Committed by Johan Hedberg

Bluetooth: Add BUILD_BUG_ON for size of struct sockaddr_hci

This adds an extra check for ensuring that the size of sockaddr_hci
does not grow larger than sockaddr.
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
parent 1904a853
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment