Module Name: src
Committed By: wiz
Date: Tue Jan 5 11:41:00 UTC 2016
Modified Files:
src/usr.bin/ftp: fetch.c
Log Message:
Fix downloads of local files using file:// URLs
Previously it would error out in copyurlinfo() when copying a NULL port.
To generate a diff of this commit:
cvs rdiff -u -r1.219 -r1.220 src/usr.bin/ftp/fetch.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/ftp/fetch.c
diff -u src/usr.bin/ftp/fetch.c:1.219 src/usr.bin/ftp/fetch.c:1.220
--- src/usr.bin/ftp/fetch.c:1.219 Thu Dec 17 20:36:36 2015
+++ src/usr.bin/ftp/fetch.c Tue Jan 5 11:41:00 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: fetch.c,v 1.219 2015/12/17 20:36:36 christos Exp $ */
+/* $NetBSD: fetch.c,v 1.220 2016/01/05 11:41:00 wiz Exp $ */
/*-
* Copyright (c) 1997-2015 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: fetch.c,v 1.219 2015/12/17 20:36:36 christos Exp $");
+__RCSID("$NetBSD: fetch.c,v 1.220 2016/01/05 11:41:00 wiz Exp $");
#endif /* not lint */
/*
@@ -424,6 +424,7 @@ parse_url(const char *url, const char *d
} else if (STRNEQUAL(url, FILE_URL)) {
url += sizeof(FILE_URL) - 1;
ui->utype = FILE_URL_T;
+ tport = "";
#ifdef WITH_SSL
} else if (STRNEQUAL(url, HTTPS_URL)) {
url += sizeof(HTTPS_URL) - 1;