Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Feb 2016 21:21:45 +0000 (UTC)
From:      Michael Tuexen <tuexen@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r295772 - head/sys/netinet
Message-ID:  <201602182121.u1ILLjj2015612@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tuexen
Date: Thu Feb 18 21:21:45 2016
New Revision: 295772
URL: https://svnweb.freebsd.org/changeset/base/295772

Log:
  Add some protection code.
  
  CID:		1331893
  MFC after:	3 days

Modified:
  head/sys/netinet/sctp_input.c

Modified: head/sys/netinet/sctp_input.c
==============================================================================
--- head/sys/netinet/sctp_input.c	Thu Feb 18 21:05:04 2016	(r295771)
+++ head/sys/netinet/sctp_input.c	Thu Feb 18 21:21:45 2016	(r295772)
@@ -365,8 +365,10 @@ sctp_process_init(struct sctp_init_chunk
 	}
 	SCTP_TCB_SEND_UNLOCK(stcb);
 	asoc->streamoutcnt = asoc->pre_open_streams;
-	for (i = 0; i < asoc->streamoutcnt; i++) {
-		asoc->strmout[i].state = SCTP_STREAM_OPEN;
+	if (asoc->strmout) {
+		for (i = 0; i < asoc->streamoutcnt; i++) {
+			asoc->strmout[i].state = SCTP_STREAM_OPEN;
+		}
 	}
 	/* EY - nr_sack: initialize highest tsn in nr_mapping_array */
 	asoc->highest_tsn_inside_nr_map = asoc->highest_tsn_inside_map;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201602182121.u1ILLjj2015612>