From 28c25b6696a678289727aae0c5d47a79cf76e9f0 Mon Sep 17 00:00:00 2001 From: joerg Date: Tue, 8 Nov 2011 18:02:27 +0000 Subject: More help for stupid glibc headers. --- net/libfetch/files/ftp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'net/libfetch') 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 @@ -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(); -- cgit v1.2.3