summaryrefslogtreecommitdiff
path: root/usr.bin/ftp/fetch.c
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1997-09-04 04:37:18 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1997-09-04 04:37:18 +0000
commit2554a4cd0c3e889db42e6d3ae0edaf40f59abb49 (patch)
tree37f7c139ba3ff8844b260f7f2a9ccbcf34ed9b36 /usr.bin/ftp/fetch.c
parent6e420cc3b1ae028325992e1092f42f11edf32c91 (diff)
Updtaes from NetBSD (lukem)
bugs fixed: * don't interpret '-' or '|' when a local filename is determined from the remote name (i.e, in mget, and in get with only one argument). This is implemented using an extra argument to recvrequest(). Fixes a major security hole. * clean up memory leak when using globulize() * clean up a couple of comments * fix wording in TNF copyright features added: * support for TIS fwtk gate-ftp servers: * read defaults from $FTPSERVER && $FTPSERVERPORT * start in gate-ftp mode if invoked as 'gate-ftp' * toggle or set with 'gate [host [port]]' Other changes: * use symbolic flags in access(2) * Use USHRT_MAX, not 0xffff
Diffstat (limited to 'usr.bin/ftp/fetch.c')
-rw-r--r--usr.bin/ftp/fetch.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.bin/ftp/fetch.c b/usr.bin/ftp/fetch.c
index bc46dbb30f9..c6c431106f1 100644
--- a/usr.bin/ftp/fetch.c
+++ b/usr.bin/ftp/fetch.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: fetch.c,v 1.14 1997/07/25 21:56:20 millert Exp $ */
-/* $NetBSD: fetch.c,v 1.13 1997/07/20 12:49:26 lukem Exp $ */
+/* $OpenBSD: fetch.c,v 1.15 1997/09/04 04:37:15 millert Exp $ */
+/* $NetBSD: fetch.c,v 1.14 1997/08/18 10:20:20 lukem Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -27,8 +27,8 @@
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
@@ -38,7 +38,7 @@
*/
#ifndef lint
-static char rcsid[] = "$OpenBSD: fetch.c,v 1.14 1997/07/25 21:56:20 millert Exp $";
+static char rcsid[] = "$OpenBSD: fetch.c,v 1.15 1997/09/04 04:37:15 millert Exp $";
#endif /* not lint */
/*
@@ -209,7 +209,7 @@ url_get(origline, proxyenv, fd)
long nport;
nport = strtol(portnum, &ep, 10);
- if (nport < 1 || nport > 0xffff || *ep != '\0') {
+ if (nport < 1 || nport > USHRT_MAX || *ep != '\0') {
warnx("Invalid port: %s", portnum);
goto cleanup_url_get;
}