From owner-freebsd-audit Wed Jan 31 6:17:18 2001 Delivered-To: freebsd-audit@freebsd.org Received: from gw.nectar.com (gw.nectar.com [208.42.49.153]) by hub.freebsd.org (Postfix) with ESMTP id B742637B69D for ; Wed, 31 Jan 2001 06:17:00 -0800 (PST) Received: from hamlet.nectar.com (hamlet.nectar.com [10.0.1.102]) by gw.nectar.com (Postfix) with ESMTP id 1064B18C8F; Wed, 31 Jan 2001 08:17:00 -0600 (CST) Received: (from nectar@localhost) by hamlet.nectar.com (8.11.1/8.9.3) id f0VEGxF05163; Wed, 31 Jan 2001 08:16:59 -0600 (CST) (envelope-from nectar@spawn.nectar.com) Date: Wed, 31 Jan 2001 08:16:59 -0600 From: "Jacques A. Vidrine" To: FreeBSD-audit Cc: Mike Heffner Subject: [UPDATED] Re: patch for libc/net/hesiod.c Message-ID: <20010131081659.C4720@hamlet.nectar.com> Mail-Followup-To: "Jacques A. Vidrine" , FreeBSD-audit , Mike Heffner References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from mheffner@vt.edu on Tue, Jan 30, 2001 at 11:01:21PM -0500 X-Url: http://www.nectar.com/ Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG This is the patch I think should be applied. Comments? Thanks, Mike, for checking this stuff out! diff -u -r1.3 hesiod.c --- hesiod.c 2000/09/30 17:29:54 1.3 +++ hesiod.c 2001/01/31 14:16:06 @@ -162,7 +162,10 @@ const char *rhs; int len; - strcpy(bindname, name); + if (strlcpy(bindname, name, sizeof(bindname)) >= sizeof(bindname)) { + errno = EMSGSIZE; + return NULL; + } /* * Find the right right hand side to use, possibly Cheers, -- Jacques Vidrine / n@nectar.com / jvidrine@verio.net / nectar@FreeBSD.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message