From e69967f5348cec651f8806d25d2c59ac8ed8c2a2 Mon Sep 17 00:00:00 2001 From: nectar Date: Tue, 29 Apr 2003 21:13:50 +0000 Subject: `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 --- lib/libc/net/getaddrinfo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/libc/net/getaddrinfo.c') diff --git a/lib/libc/net/getaddrinfo.c b/lib/libc/net/getaddrinfo.c index e2cb71a..2b8708a 100644 --- a/lib/libc/net/getaddrinfo.c +++ b/lib/libc/net/getaddrinfo.c @@ -853,7 +853,7 @@ get_canonname(pai, ai, str) ai->ai_canonname = (char *)malloc(strlen(str) + 1); if (ai->ai_canonname == NULL) return EAI_MEMORY; - strlcpy(ai->ai_canonname, str, strlen(str) + 1); + _strlcpy(ai->ai_canonname, str, strlen(str) + 1); } return 0; } @@ -1305,7 +1305,7 @@ getanswer(answer, anslen, qname, qtype, pai) had_error++; continue; } - strlcpy(bp, tbuf, ep - bp); + _strlcpy(bp, tbuf, ep - bp); canonname = bp; bp += n; continue; -- cgit v1.1