NetBSD-Bugs archive

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

Re: bin/60930: ftp with file:/// uri fails, ftp_strdup: called with NULL argument



The following reply was made to PR bin/60930; it has been noted by GNATS.

From: RVP <rvp%SDF.ORG@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: bin/60930: ftp with file:/// uri fails, ftp_strdup: called with
 NULL argument
Date: Tue, 27 Oct 2026 09:49:37 +0000 (UTC)

 On Tue, 27 Oct 2026, netbsd@linear.network via gnats wrote:
 
 >> Description:
 > the ftp program is documented in its man page as supporting file:// uri for obtaining files.
 >
 > however, when attempting to use that functionality, the following error is produced:
 >
 >    ftp: ftp_strdup: called with NULL argument
 >
 >> How-To-Repeat:
 > attempt to fetch a file from the local filesystem using the ftp program, using a file:// uri:
 >
 > $ ftp ftp:///netbsd
 > ftp: ftp_strdup: called with NULL argument
 >
 
 Try:
 
 ```
 --- src/usr.bin/ftp/fetch.c.orig	2026-07-20 04:05:14.623169837 +0000
 +++ src/usr.bin/ftp/fetch.c	2026-10-27 09:41:19.950487587 +0000
 @@ -579,7 +579,7 @@
   #endif /* INET6 */
   		if ((cp = strchr(thost, ':')) != NULL)
   			*cp++ = '\0';
 -	if (*thost != '\0')
 +	// if (*thost != '\0')
   		ui->host = thost;
 
   			/* look for [:port] */
 ```
 
 -RVP
 



Home | Main Index | Thread Index | Old Index