svn commit: r360741 - stable/11/sys/netinet
Michael Tuexen
tuexen at FreeBSD.org
Thu May 7 02:03:26 UTC 2020
Author: tuexen
Date: Thu May 7 02:03:25 2020
New Revision: 360741
URL: https://svnweb.freebsd.org/changeset/base/360741
Log:
MFC r353071: Improve address parsing
When skipping the address parameter, take the padding into account.
Modified:
stable/11/sys/netinet/sctp_asconf.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/netinet/sctp_asconf.c
==============================================================================
--- stable/11/sys/netinet/sctp_asconf.c Thu May 7 02:01:04 2020 (r360740)
+++ stable/11/sys/netinet/sctp_asconf.c Thu May 7 02:03:25 2020 (r360741)
@@ -697,8 +697,8 @@ sctp_handle_asconf(struct mbuf *m, unsigned int offset
sctp_m_freem(m_ack);
return;
}
- /* param_length is already validated in process_control... */
- offset += ntohs(p_addr->ph.param_length); /* skip lookup addr */
+ /* skip lookup addr */
+ offset += SCTP_SIZE32(ntohs(p_addr->ph.param_length));
/* get pointer to first asconf param in ASCONF */
aph = (struct sctp_asconf_paramhdr *)sctp_m_getptr(m, offset, sizeof(struct sctp_asconf_paramhdr), (uint8_t *)&aparam_buf);
if (aph == NULL) {
More information about the svn-src-stable
mailing list