[SCTP] Fix potential null pointer dereference in sctp_err_lookup().

Linux Kernel Mailing List <[email protected]>
Newsgroups gmane.linux.kernel.commits.2-4
Message-ID <[email protected]>
ChangeSet 1.1530.1.11, 2004/12/27 11:12:31-08:00, [email protected]

	[SCTP] Fix potential null pointer dereference in sctp_err_lookup().
	
	Signed-off-by: Vladislav Yasevich <[email protected]>
	Signed-off-by: Sridhar Samudrala <[email protected]>



 input.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)


diff -Nru a/net/sctp/input.c b/net/sctp/input.c
--- a/net/sctp/input.c	2005-01-15 07:05:04 -08:00
+++ b/net/sctp/input.c	2005-01-15 07:05:04 -08:00
@@ -320,11 +320,12 @@
 	}
 
 	if (asoc) {
+		sk = asoc->base.sk;
+
 		if (ntohl(sctphdr->vtag) != asoc->c.peer_vtag) {
 			ICMP_INC_STATS_BH(IcmpInErrors);
 			goto out;
 		}
-		sk = asoc->base.sk;
 	} else
 		sk = ep->base.sk;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.