summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2011-11-08 18:02:27 +0000
committerjoerg <joerg@pkgsrc.org>2011-11-08 18:02:27 +0000
commitc93f02b807ab50b6b23d94ae16874eb1c11d5307 (patch)
tree8a6ec1f05a13f4235b7efb22b64e369048076137 /net
parent86487ca955035821a7d0af1820d2a4beff562490 (diff)
downloadpkgsrc-c93f02b807ab50b6b23d94ae16874eb1c11d5307.tar.gz
More help for stupid glibc headers.
Diffstat (limited to 'net')
-rw-r--r--net/libfetch/files/ftp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/libfetch/files/ftp.c b/net/libfetch/files/ftp.c
index fac08eee3e3..7b1da11fd82 100644
--- a/net/libfetch/files/ftp.c
+++ b/net/libfetch/files/ftp.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ftp.c,v 1.39 2011/10/02 19:15:34 marino Exp $ */
+/* $NetBSD: ftp.c,v 1.40 2011/11/08 18:02:27 joerg Exp $ */
/*-
* Copyright (c) 1998-2004 Dag-Erling Coïdan Smørgrav
* Copyright (c) 2008, 2009, 2010 Joerg Sonnenberger <joerg@NetBSD.org>
@@ -325,7 +325,8 @@ ftp_cwd(conn_t *conn, const char *path, int subdir)
} else if (strcmp(conn->ftp_home, "/") == 0) {
dst = strdup(path - 1);
} else {
- asprintf(&dst, "%s/%s", conn->ftp_home, path);
+ if (asprintf(&dst, "%s/%s", conn->ftp_home, path) == -1)
+ dst = NULL;
}
if (dst == NULL) {
fetch_syserr();