Module Name:    src
Committed By:   riz
Date:           Sat Nov 20 00:54:10 UTC 2010

Modified Files:
        src/usr.bin/ftp [netbsd-5]: fetch.c

Log Message:
Pull up following revision(s) (requested by lukem in ticket #1369):
        usr.bin/ftp/fetch.c: revision 1.189
avoid NULL dereference in log output if the command line parser
failed to extract a port number from the URL


To generate a diff of this commit:
cvs rdiff -u -r1.185 -r1.185.6.1 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.185 src/usr.bin/ftp/fetch.c:1.185.6.1
--- src/usr.bin/ftp/fetch.c:1.185	Mon Apr 28 20:24:13 2008
+++ src/usr.bin/ftp/fetch.c	Sat Nov 20 00:54:10 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: fetch.c,v 1.185 2008/04/28 20:24:13 martin Exp $	*/
+/*	$NetBSD: fetch.c,v 1.185.6.1 2010/11/20 00:54:10 riz Exp $	*/
 
 /*-
  * Copyright (c) 1997-2008 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: fetch.c,v 1.185 2008/04/28 20:24:13 martin Exp $");
+__RCSID("$NetBSD: fetch.c,v 1.185.6.1 2010/11/20 00:54:10 riz Exp $");
 #endif /* not lint */
 
 /*
@@ -1491,7 +1491,8 @@
 	autologin = oautologin;
 	if ((connected == 0) ||
 	    (connected == 1 && !ftp_login(host, user, pass))) {
-		warnx("Can't connect or login to host `%s:%s'", host, port);
+		warnx("Can't connect or login to host `%s:%s'",
+			host, port ? port : "?");
 		goto cleanup_fetch_ftp;
 	}
 

Reply via email to