]> git.baikalelectronics.ru Git - kernel.git/commit
sctp: fix the length check in sctp_getsockopt_maxburst()
authorWei Yongjun <yjwei@cn.fujitsu.com>
Mon, 2 Mar 2009 09:46:12 +0000 (09:46 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 3 Mar 2009 06:49:17 +0000 (22:49 -0800)
commit3fd1f6a33c9286dbcfaeb8b7fbc8d3f07864daaf
treeb4e88d10bc75fa6565d91202460fb3f0ed5cc7c5
parent66ba6c8d3aa69e065baf2ce452d0ecc5bf1f6abd
sctp: fix the length check in sctp_getsockopt_maxburst()

The code in sctp_getsockopt_maxburst() doesn't allow len to be larger
then struct sctp_assoc_value, which is a common case where app writers
just pass down the sizeof(buf) or something similar.

This patch fix the problem.

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sctp/socket.c