diff options
author | Michael Tuexen <tuexen@FreeBSD.org> | 2014-10-08 15:30:59 +0000 |
---|---|---|
committer | Michael Tuexen <tuexen@FreeBSD.org> | 2014-10-08 15:30:59 +0000 |
commit | 9ba61060204d800efd9c8c5046d590034f9d0d87 (patch) | |
tree | 6509fe51085c7ad8d08ce26757734292f4eeda09 /sys/netinet/sctp_output.c | |
parent | e29127de2e605f2a2878f6e2f1a4697ea53084fe (diff) | |
download | src-test2-9ba61060204d800efd9c8c5046d590034f9d0d87.tar.gz src-test2-9ba61060204d800efd9c8c5046d590034f9d0d87.zip |
Notes
Diffstat (limited to 'sys/netinet/sctp_output.c')
-rw-r--r-- | sys/netinet/sctp_output.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/netinet/sctp_output.c b/sys/netinet/sctp_output.c index 8260ba7cd97e..7cbb30fc8a8a 100644 --- a/sys/netinet/sctp_output.c +++ b/sys/netinet/sctp_output.c @@ -11846,7 +11846,7 @@ sctp_add_an_in_stream(struct sctp_tmit_chunk *chk, int sctp_send_str_reset_req(struct sctp_tcb *stcb, - int number_entries, uint16_t * list, + uint16_t number_entries, uint16_t * list, uint8_t send_out_req, uint8_t send_in_req, uint8_t send_tsn_req, @@ -11879,6 +11879,14 @@ sctp_send_str_reset_req(struct sctp_tcb *stcb, SCTP_LTRACE_ERR_RET(NULL, stcb, NULL, SCTP_FROM_SCTP_OUTPUT, EINVAL); return (EINVAL); } + if (number_entries > (MCLBYTES - + SCTP_MIN_OVERHEAD - + sizeof(struct sctp_chunkhdr) - + sizeof(struct sctp_stream_reset_out_request)) / + sizeof(uint16_t)) { + SCTP_LTRACE_ERR_RET(NULL, stcb, NULL, SCTP_FROM_SCTP_OUTPUT, ENOMEM); + return (ENOMEM); + } sctp_alloc_a_chunk(stcb, chk); if (chk == NULL) { SCTP_LTRACE_ERR_RET(NULL, stcb, NULL, SCTP_FROM_SCTP_OUTPUT, ENOMEM); |