Page MenuHomeFreeBSD

D31422.diff
No OneTemporary

D31422.diff

diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c
--- a/sys/netinet/tcp_usrreq.c
+++ b/sys/netinet/tcp_usrreq.c
@@ -326,6 +326,7 @@
* Preserve compatibility with old programs.
*/
if (nam->sa_family != AF_UNSPEC ||
+ nam->sa_len < offsetof(struct sockaddr_in, sin_zero) ||
sinp->sin_addr.s_addr != INADDR_ANY)
return (EAFNOSUPPORT);
nam->sa_family = AF_INET;
diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c
--- a/sys/netinet/udp_usrreq.c
+++ b/sys/netinet/udp_usrreq.c
@@ -1635,6 +1635,7 @@
* Preserve compatibility with old programs.
*/
if (nam->sa_family != AF_UNSPEC ||
+ nam->sa_len < offsetof(struct sockaddr_in, sin_zero) ||
sinp->sin_addr.s_addr != INADDR_ANY)
return (EAFNOSUPPORT);
nam->sa_family = AF_INET;

File Metadata

Mime Type
text/plain
Expires
Thu, Nov 14, 8:49 PM (7 h, 21 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14633582
Default Alt Text
D31422.diff (809 B)

Event Timeline