From owner-freebsd-current Sun Dec 14 09:44:03 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id JAA21974 for current-outgoing; Sun, 14 Dec 1997 09:44:03 -0800 (PST) (envelope-from owner-freebsd-current) Received: from frmug.org (frmug-gw.frmug.org [193.56.58.252]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id JAA21933 for ; Sun, 14 Dec 1997 09:43:50 -0800 (PST) (envelope-from pb@fasterix.frmug.org) Received: (from uucp@localhost) by frmug.org (8.8.8/frmug-2.1/nospam) with UUCP id SAA22892; Sun, 14 Dec 1997 18:43:18 +0100 (CET) (envelope-from pb@fasterix.frmug.org) Received: (from pb@localhost) by fasterix.frmug.org (8.8.8/8.8.5/pb-19970302) id SAA00996; Sun, 14 Dec 1997 18:40:21 +0100 (CET) Message-ID: <19971214184021.EU30067@@> 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() References: <199712140358.OAA05112@word.smith.net.au> <199712140420.UAA09215@rah.star-gate.com> X-Mailer: Mutt 0.59.1e Mime-Version: 1.0 In-Reply-To: <199712140420.UAA09215@rah.star-gate.com>; from Amancio Hasty on Dec 13, 1997 20:20:04 -0800 Sender: owner-freebsd-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk 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