Author: tuexen Date: Mon May 18 18:32:58 2020 New Revision: 361222 URL: https://svnweb.freebsd.org/changeset/base/361222
Log: Avoid an integer underflow. MFC after: 3 days Modified: head/sys/netinet/sctp_asconf.c Modified: head/sys/netinet/sctp_asconf.c ============================================================================== --- head/sys/netinet/sctp_asconf.c Mon May 18 18:27:10 2020 (r361221) +++ head/sys/netinet/sctp_asconf.c Mon May 18 18:32:58 2020 (r361222) @@ -1797,9 +1797,9 @@ sctp_handle_asconf_ack(struct mbuf *m, int offset, } /* switch */ /* update remaining ASCONF-ACK message length to process */ - ack_length -= SCTP_SIZE32(param_length); - if (ack_length <= 0) { - /* no more data in the mbuf chain */ + if (ack_length > SCTP_SIZE32(param_length)) { + ack_length -= SCTP_SIZE32(param_length); + } else { break; } offset += SCTP_SIZE32(param_length); _______________________________________________ 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"