diff options
author | joerg <joerg> | 2011-11-08 18:02:27 +0000 |
---|---|---|
committer | joerg <joerg> | 2011-11-08 18:02:27 +0000 |
commit | 28c25b6696a678289727aae0c5d47a79cf76e9f0 (patch) | |
tree | 8a6ec1f05a13f4235b7efb22b64e369048076137 /net/libfetch | |
parent | 8bb908669f69b29b7361ad3962612a32390d91d5 (diff) | |
download | pkgsrc-28c25b6696a678289727aae0c5d47a79cf76e9f0.tar.gz |
More help for stupid glibc headers.
Diffstat (limited to 'net/libfetch')
-rw-r--r-- | net/libfetch/files/ftp.c | 5 |
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(); |