diff options
| author | itojun <itojun@NetBSD.org> | 2003-07-12 13:23:55 +0000 |
|---|---|---|
| committer | itojun <itojun@NetBSD.org> | 2003-07-12 13:23:55 +0000 |
| commit | 032ed69f9a47a49c09dd24ffb4e5dfa09cd030b8 (patch) | |
| tree | 7a1ccda107e800453dafc3f5041e5ada3118f8af /usr.bin/ftp | |
| parent | a7f5ddbf6454871154c3109480b03fd50760ff2d (diff) | |
strlcpy
Diffstat (limited to 'usr.bin/ftp')
| -rw-r--r-- | usr.bin/ftp/fetch.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/usr.bin/ftp/fetch.c b/usr.bin/ftp/fetch.c index acd1edc8df6..3d56a3bee8f 100644 --- a/usr.bin/ftp/fetch.c +++ b/usr.bin/ftp/fetch.c @@ -1,4 +1,4 @@ -/* $NetBSD: fetch.c,v 1.141 2003/05/14 14:31:00 wiz Exp $ */ +/* $NetBSD: fetch.c,v 1.142 2003/07/12 13:30:04 itojun Exp $ */ /*- * Copyright (c) 1997-2003 The NetBSD Foundation, Inc. @@ -41,7 +41,7 @@ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: fetch.c,v 1.141 2003/05/14 14:31:00 wiz Exp $"); +__RCSID("$NetBSD: fetch.c,v 1.142 2003/07/12 13:30:04 itojun Exp $"); #endif /* not lint */ /* @@ -665,9 +665,8 @@ fetch_url(const char *url, const char *proxyenv, char *proxyauth, char *wwwauth) */ ai_unmapped(res); if (getnameinfo(res->ai_addr, res->ai_addrlen, - hbuf, sizeof(hbuf), NULL, 0, - NI_NUMERICHOST) != 0) - strncpy(hbuf, "invalid", sizeof(hbuf)); + hbuf, sizeof(hbuf), NULL, 0, NI_NUMERICHOST) != 0) + strlcpy(hbuf, "invalid", sizeof(hbuf)); if (verbose && res != res0) fprintf(ttyout, "Trying %s...\n", hbuf); |
