diff options
| author | Michael Tuexen <tuexen@FreeBSD.org> | 2016-04-18 11:39:41 +0000 |
|---|---|---|
| committer | Michael Tuexen <tuexen@FreeBSD.org> | 2016-04-18 11:39:41 +0000 |
| commit | f8ee69bf81d37e120b3ca9b04c32110a5e2c43c3 (patch) | |
| tree | db03fe72aa1b7e5509c71c15c22662fc0de062fc | |
| parent | 9ca014f67bd26306a91845993e5a6ec3114739c3 (diff) | |
Notes
| -rw-r--r-- | sys/netinet/sctp_indata.c | 2 | ||||
| -rw-r--r-- | sys/netinet/sctp_output.c | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/sys/netinet/sctp_indata.c b/sys/netinet/sctp_indata.c index 8eda62ba25e8..f8baab7f05e4 100644 --- a/sys/netinet/sctp_indata.c +++ b/sys/netinet/sctp_indata.c @@ -2598,7 +2598,7 @@ sctp_process_data(struct mbuf **mm, int iphlen, int *offset, int length, } else { clen = sizeof(struct sctp_idata_chunk); } - if ((size_t)chk_length < clen) { + if (chk_length < clen) { /* * Need to send an abort since we had a * invalid data chunk. diff --git a/sys/netinet/sctp_output.c b/sys/netinet/sctp_output.c index ef789eabddd0..d91fb8239a14 100644 --- a/sys/netinet/sctp_output.c +++ b/sys/netinet/sctp_output.c @@ -7186,7 +7186,8 @@ sctp_move_to_outqueue(struct sctp_tcb *stcb, struct sctp_tmit_chunk *chk; struct sctp_data_chunk *dchkh = NULL; struct sctp_idata_chunk *ndchkh = NULL; - uint32_t to_move, length, leading; + uint32_t to_move, length; + int leading; uint8_t rcv_flags = 0; uint8_t some_taken; uint8_t send_lock_up = 0; @@ -7491,9 +7492,9 @@ dont_do_it: atomic_subtract_int(&sp->length, to_move); } if (stcb->asoc.idata_supported == 0) { - leading = (int)sizeof(struct sctp_data_chunk); + leading = sizeof(struct sctp_data_chunk); } else { - leading = (int)sizeof(struct sctp_idata_chunk); + leading = sizeof(struct sctp_idata_chunk); } if (M_LEADINGSPACE(chk->data) < leading) { /* Not enough room for a chunk header, get some */ |
