Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/ftp fix 'junk pointer free' issue.



details:   https://anonhg.NetBSD.org/src/rev/9ddd39531d51
branches:  trunk
changeset: 474390:9ddd39531d51
user:      itojun <itojun%NetBSD.org@localhost>
date:      Sun Jul 04 22:46:20 1999 +0000

description:
fix 'junk pointer free' issue.

diffstat:

 usr.bin/ftp/fetch.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (32 lines):

diff -r 11eec5978ebe -r 9ddd39531d51 usr.bin/ftp/fetch.c
--- a/usr.bin/ftp/fetch.c       Sun Jul 04 22:44:28 1999 +0000
+++ b/usr.bin/ftp/fetch.c       Sun Jul 04 22:46:20 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fetch.c,v 1.60 1999/07/02 08:07:41 itojun Exp $        */
+/*     $NetBSD: fetch.c,v 1.61 1999/07/04 22:46:20 itojun Exp $        */
 
 /*-
  * Copyright (c) 1997, 1998, 1999 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: fetch.c,v 1.60 1999/07/02 08:07:41 itojun Exp $");
+__RCSID("$NetBSD: fetch.c,v 1.61 1999/07/04 22:46:20 itojun Exp $");
 #endif /* not lint */
 
 /*
@@ -302,11 +302,11 @@
        if (strncasecmp(url, HTTP_URL, sizeof(HTTP_URL) - 1) == 0) {
                url += sizeof(HTTP_URL) - 1;
                *type = HTTP_URL_T;
-               *port = httpport;
+               *port = strdup(httpport);
        } else if (strncasecmp(url, FTP_URL, sizeof(FTP_URL) - 1) == 0) {
                url += sizeof(FTP_URL) - 1;
                *type = FTP_URL_T;
-               *port = ftpport;
+               *port = strdup(ftpport);
        } else if (strncasecmp(url, FILE_URL, sizeof(FILE_URL) - 1) == 0) {
                url += sizeof(FILE_URL) - 1;
                *type = FILE_URL_T;



Home | Main Index | Thread Index | Old Index