svn commit: r364353 - head/sys/netinet
Michael Tuexen
tuexen at FreeBSD.org
Tue Aug 18 19:25:04 UTC 2020
Author: tuexen
Date: Tue Aug 18 19:25:03 2020
New Revision: 364353
URL: https://svnweb.freebsd.org/changeset/base/364353
Log:
Fix two bugs I introduced in r362563.
Found by running syzkaller.
MFC after: 3 days
Modified:
head/sys/netinet/sctp_usrreq.c
Modified: head/sys/netinet/sctp_usrreq.c
==============================================================================
--- head/sys/netinet/sctp_usrreq.c Tue Aug 18 17:30:51 2020 (r364352)
+++ head/sys/netinet/sctp_usrreq.c Tue Aug 18 19:25:03 2020 (r364353)
@@ -1124,7 +1124,7 @@ sctp_fill_up_addresses_vrf(struct sctp_inpcb *inp,
if (actual + sizeof(struct sockaddr_in6) > limit) {
return (actual);
}
- in6_sin_2_v4mapsin6(sin, (struct sockaddr_in6 *)&addr);
+ in6_sin_2_v4mapsin6(sin, (struct sockaddr_in6 *)addr);
((struct sockaddr_in6 *)addr)->sin6_port = inp->sctp_lport;
addr = (struct sockaddr *)((caddr_t)addr + sizeof(struct sockaddr_in6));
actual += sizeof(struct sockaddr_in6);
@@ -2271,7 +2271,7 @@ flags_out:
(net->ro._l_addr.sa.sa_family == AF_INET)) {
/* Must map the address */
in6_sin_2_v4mapsin6(&net->ro._l_addr.sin,
- (struct sockaddr_in6 *)&addr);
+ (struct sockaddr_in6 *)addr);
} else {
memcpy(addr, &net->ro._l_addr, cpsz);
}
More information about the svn-src-all
mailing list