Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=dfee0a725bb027b749ffdd318eb48b91d564b266
Commit:     dfee0a725bb027b749ffdd318eb48b91d564b266
Parent:     aabb601b0f08b909b650f1a7bfa1e8d9b5a8d999
Author:     Olaf Kirch <[EMAIL PROTECTED]>
AuthorDate: Fri Mar 9 13:55:38 2007 -0800
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Fri Mar 9 13:55:38 2007 -0800

    [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 <[EMAIL PROTECTED]>
    Acked-by: YOSHIFUJI Hideaki <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 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 4e0561a..b82333b 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,
                }
 
                /* routing header option needs extra check */
-               if (optname == IPV6_RTHDR && opt->srcrt) {
+               if (optname == IPV6_RTHDR && opt && opt->srcrt) {
                        struct ipv6_rt_hdr *rthdr = opt->srcrt;
                        switch (rthdr->type) {
                        case IPV6_SRCRT_TYPE_0:
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to