netrom: avoid overflows in nr_setsockopt()
authorXi Wang <xi.wang@gmail.com>
Tue, 27 Dec 2011 09:44:53 +0000 (09:44 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 28 Dec 2011 19:08:08 +0000 (14:08 -0500)
commit32288eb4d940b10e40c6d4178fe3a40d1437d2f8
tree7cdd2b53eae8b6381eec1ddd497f28615277f1c2
parentba1cffe0257bcd4d0070bc0e64f8ead97fefd148
netrom: avoid overflows in nr_setsockopt()

Check setsockopt arguments to avoid overflows and return -EINVAL for
too large arguments.

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/netrom/af_netrom.c