Date: Sun, 14 Dec 1997 18:40:21 +0100 From: pb@fasterix.freenix.org (Pierre Beyssac) To: hasty@rah.star-gate.com (Amancio Hasty) Cc: freebsd-current@freebsd.org Subject: patch for oaccept() Message-ID: <19971214184021.EU30067@@> In-Reply-To: <199712140420.UAA09215@rah.star-gate.com>; from Amancio Hasty on Dec 13, 1997 20:20:04 -0800 References: <199712140358.OAA05112@word.smith.net.au> <199712140420.UAA09215@rah.star-gate.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Amancio Hasty writes:
> Yes, Q2 works peachy over here without the orecvfrom->recvfrom change.
I've got one new patch that I just submitted a PR for. This is the
same problem with oaccept().
It might fix reported problems with Java applets not able to receive
connections when using the Linux JDK.
--- uipc_syscalls.c.orig Sun Dec 14 15:05:04 1997
+++ uipc_syscalls.c Sun Dec 14 18:28:44 1997
@@ -242,15 +242,16 @@
goto gotnoname;
return 0;
}
if (uap->name) {
+ /* check sa_len before it is destroyed */
+ if (namelen > sa->sa_len)
+ namelen = sa->sa_len;
#ifdef COMPAT_OLDSOCK
if (compat)
((struct osockaddr *)sa)->sa_family =
sa->sa_family;
#endif
- if (namelen > sa->sa_len)
- namelen = sa->sa_len;
error = copyout(sa, (caddr_t)uap->name, (u_int)namelen);
if (!error)
gotnoname:
error = copyout((caddr_t)&namelen,
--
Pierre Beyssac pb@fasterix.frmug.org pb@fasterix.freenix.org
{Free,Net,Open}BSD, Linux : il y a moins bien, mais c'est plus cher
Free domains: http://www.eu.org/ or mail dns-manager@EU.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19971214184021.EU30067>
