diff options
author | nectar <nectar@FreeBSD.org> | 2003-04-29 21:13:50 +0000 |
---|---|---|
committer | nectar <nectar@FreeBSD.org> | 2003-04-29 21:13:50 +0000 |
commit | e69967f5348cec651f8806d25d2c59ac8ed8c2a2 (patch) | |
tree | e9749f1ff2693755bce73e10528fc8cc6a6563ea /lib/libc/net/getaddrinfo.c | |
parent | 975e4bcef1ba69d85a5c90f1849accc3cd74cb65 (diff) | |
download | FreeBSD-src-e69967f5348cec651f8806d25d2c59ac8ed8c2a2.zip FreeBSD-src-e69967f5348cec651f8806d25d2c59ac8ed8c2a2.tar.gz |
`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
Diffstat (limited to 'lib/libc/net/getaddrinfo.c')
-rw-r--r-- | lib/libc/net/getaddrinfo.c | 4 |
1 files changed, 2 insertions, 2 deletions
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; |