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;
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to