diff options
author | Olaf Kirch <olaf.kirch@oracle.com> | 2007-03-09 16:55:38 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2007-03-09 16:55:38 -0500 |
commit | dfee0a725bb027b749ffdd318eb48b91d564b266 (patch) | |
tree | cdb3571b66fec9105ece2e22b27575a2cf2cbfb5 /net | |
parent | aabb601b0f08b909b650f1a7bfa1e8d9b5a8d999 (diff) |
[IPV6]: Fix for ipv6_setsockopt NULL dereference
I came across this bug in http://bugzilla.kernel.org/show_bug.cgi?id=8155
Signed-off-by: Olaf Kirch <olaf.kirch@oracle.com>
Acked-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv6/ipv6_sockglue.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c index 4e0561a082d0..b82333b9228f 100644 --- a/net/ipv6/ipv6_sockglue.c +++ b/net/ipv6/ipv6_sockglue.c | |||
@@ -413,7 +413,7 @@ static int do_ipv6_setsockopt(struct sock *sk, int level, int optname, | |||
413 | } | 413 | } |
414 | 414 | ||
415 | /* routing header option needs extra check */ | 415 | /* routing header option needs extra check */ |
416 | if (optname == IPV6_RTHDR && opt->srcrt) { | 416 | if (optname == IPV6_RTHDR && opt && opt->srcrt) { |
417 | struct ipv6_rt_hdr *rthdr = opt->srcrt; | 417 | struct ipv6_rt_hdr *rthdr = opt->srcrt; |
418 | switch (rthdr->type) { | 418 | switch (rthdr->type) { |
419 | case IPV6_SRCRT_TYPE_0: | 419 | case IPV6_SRCRT_TYPE_0: |