[407] in Hesiod

home help back first fref pref prev next nref lref last post

FW: [UPDATED] Re: patch for libc/net/hesiod.c

daemon@ATHENA.MIT.EDU (Mike Heffner)
Wed Jan 31 14:35:26 2001

Date: Wed, 31 Jan 2001 14:34:07 -0500 (EST)
Resent-From: "Jacques A. Vidrine" <n@nectar.com>
From: Mike Heffner <mheffner@vt.edu>
Resent-To: FreeBSD-audit <FreeBSD-audit@freebsd.org>
To: hesiod@MIT.EDU
Message-Id: <XFMail.20010131143407.mheffner@vt.edu>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 8bit

Hi,

The following patch will most likely be applied to the FreeBSD source for the
hesiod(3) functions in libc. It was mentioned that they should be forwarded to
you in case you have any use for them in the master code.

Followups can be sent to FreeBSD-audit@freebsd.org.

Thanks,


-----FW: <20010131081659.C4720@hamlet.nectar.com>-----

Date: Wed, 31 Jan 2001 08:16:59 -0600
Sender: nectar@nectar.com
From: "Jacques A. Vidrine" <n@nectar.com>
To: FreeBSD-audit <FreeBSD-audit@freebsd.org>
Subject: [UPDATED] Re: patch for libc/net/hesiod.c
Cc: Mike Heffner <mheffner@vt.edu>

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

--------------End of forwarded message-------------------------

-- 

  Mike Heffner       <mheffner@vt.edu>
  Blacksburg, VA           ICQ# 882073
  http://filebox.vt.edu/users/mheffner


home help back first fref pref prev next nref lref last post