diff options
author | joerg <joerg@pkgsrc.org> | 2010-03-21 16:48:42 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2010-03-21 16:48:42 +0000 |
commit | a9575b4a73cb78c23ef26a6f17153da465e2086b (patch) | |
tree | 6211a32fe98465f7d2349355551748ae410696f5 /net/libfetch/files/common.c | |
parent | f437aa96800c3b8ff05894fc907d6b91e88a56c9 (diff) | |
download | pkgsrc-a9575b4a73cb78c23ef26a6f17153da465e2086b.tar.gz |
libfetch-2.31:
PR 43013 by Brook Milligan: fetch(3) violates RFC 1738 for ftp:// URLs
if the home directory is not the root directory.
Remember the current directory the first time a CWD / CDUP has to be
issued. Use the document as full URL if the URL started with two /
(quoted or not), otherwise append it to the initial directory.
Diffstat (limited to 'net/libfetch/files/common.c')
-rw-r--r-- | net/libfetch/files/common.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/libfetch/files/common.c b/net/libfetch/files/common.c index fd2c0aa8a68..5be2a8e78ca 100644 --- a/net/libfetch/files/common.c +++ b/net/libfetch/files/common.c @@ -1,4 +1,4 @@ -/* $NetBSD: common.c,v 1.25 2010/01/24 16:54:23 joerg Exp $ */ +/* $NetBSD: common.c,v 1.26 2010/03/21 16:48:43 joerg Exp $ */ /*- * Copyright (c) 1998-2004 Dag-Erling Coïdan Smørgrav * Copyright (c) 2008, 2010 Joerg Sonnenberger <joerg@NetBSD.org> @@ -231,6 +231,7 @@ fetch_reopen(int sd) /* allocate and fill connection structure */ if ((conn = calloc(1, sizeof(*conn))) == NULL) return (NULL); + conn->ftp_home = NULL; conn->cache_url = NULL; conn->next_buf = NULL; conn->next_len = 0; @@ -711,6 +712,7 @@ fetch_close(conn_t *conn) ret = close(conn->sd); if (conn->cache_url) fetchFreeURL(conn->cache_url); + free(conn->ftp_home); free(conn->buf); free(conn); return (ret); |