aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/net/hesiod.c
diff options
context:
space:
mode:
authorJacques Vidrine <nectar@FreeBSD.org>2003-04-29 21:13:50 +0000
committerJacques Vidrine <nectar@FreeBSD.org>2003-04-29 21:13:50 +0000
commit5723e501abb675701352eb3e9fd58bb3cc2c649d (patch)
treee9749f1ff2693755bce73e10528fc8cc6a6563ea /lib/libc/net/hesiod.c
parenta8b5a9cd120e319cacf1c68e4a257e6955e0d5d6 (diff)
downloadsrc-5723e501abb675701352eb3e9fd58bb3cc2c649d.tar.gz
src-5723e501abb675701352eb3e9fd58bb3cc2c649d.zip
`Hide' strlcpy and strlcat (using the namespace.h / __weak_reference
technique) so that we don't wind up calling into an application's version if the application defines them. Inspired by: qpopper's interfering and buggy version of strlcpy
Notes
Notes: svn path=/head/; revision=114256
Diffstat (limited to 'lib/libc/net/hesiod.c')
-rw-r--r--lib/libc/net/hesiod.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libc/net/hesiod.c b/lib/libc/net/hesiod.c
index c22bdbad836b..214f86ef9b71 100644
--- a/lib/libc/net/hesiod.c
+++ b/lib/libc/net/hesiod.c
@@ -51,6 +51,7 @@ static char *orig_rcsid = "$NetBSD: hesiod.c,v 1.9 1999/02/11 06:16:38 simonb Ex
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
+#include "namespace.h"
#include <sys/types.h>
#include <sys/param.h>
#include <netinet/in.h>
@@ -64,6 +65,7 @@ __FBSDID("$FreeBSD$");
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#include "un-namespace.h"
struct hesiod_p {
char *lhs; /* normally ".ns" */
@@ -163,7 +165,7 @@ hesiod_to_bind(void *context, const char *name, const char *type)
const char *rhs;
int len;
- if (strlcpy(bindname, name, sizeof(bindname)) >= sizeof(bindname)) {
+ if (_strlcpy(bindname, name, sizeof(bindname)) >= sizeof(bindname)) {
errno = EMSGSIZE;
return NULL;
}