From 84504a9ffafb96d01fdaa2af6dbd2f4afd913ab5 Mon Sep 17 00:00:00 2001 From: Shan Wei Date: Tue, 22 Sep 2009 15:41:10 +0000 Subject: [PATCH] --- yaml --- r: 166306 b: refs/heads/master c: 0915921bde4eb5d943b17c175febac58a254d7b6 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/net/ipv4/ip_sockglue.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 996f27664512..59847ca37c99 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 8b3f6af86378d0a10ca2f1ded1da124aef13b62c +refs/heads/master: 0915921bde4eb5d943b17c175febac58a254d7b6 diff --git a/trunk/net/ipv4/ip_sockglue.c b/trunk/net/ipv4/ip_sockglue.c index fc7993e9061f..5a0693576e82 100644 --- a/trunk/net/ipv4/ip_sockglue.c +++ b/trunk/net/ipv4/ip_sockglue.c @@ -611,6 +611,9 @@ static int do_ip_setsockopt(struct sock *sk, int level, * Check the arguments are allowable */ + if (optlen < sizeof(struct in_addr)) + goto e_inval; + err = -EFAULT; if (optlen >= sizeof(struct ip_mreqn)) { if (copy_from_user(&mreq, optval, sizeof(mreq)))