diff options
author | David S. Miller <davem@davemloft.net> | 2016-12-10 22:21:55 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-12-10 22:21:55 +0100 |
commit | 821781a9f40673c2aa0f29d9d8226ec320dff20c (patch) | |
tree | c9d5cb8a184fff84a9d841d8cb5da4b26be5c551 /net | |
parent | net: skb_condense() can also deal with empty skbs (diff) | |
parent | Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert... (diff) | |
download | linux-821781a9f40673c2aa0f29d9d8226ec320dff20c.tar.xz linux-821781a9f40673c2aa0f29d9d8226ec320dff20c.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'net')
-rw-r--r-- | net/can/raw.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/can/raw.c b/net/can/raw.c index 972c187d40ab..b075f028d7e2 100644 --- a/net/can/raw.c +++ b/net/can/raw.c @@ -499,6 +499,9 @@ static int raw_setsockopt(struct socket *sock, int level, int optname, if (optlen % sizeof(struct can_filter) != 0) return -EINVAL; + if (optlen > CAN_RAW_FILTER_MAX * sizeof(struct can_filter)) + return -EINVAL; + count = optlen / sizeof(struct can_filter); if (count > 1) { |