NetBSD Problem Report #16640
Received: (qmail 20239 invoked from network); 3 May 2002 20:39:58 -0000
Message-Id: <20020503204001.BFD031112F@www.netbsd.org>
Date: Fri, 3 May 2002 13:40:01 -0700 (PDT)
From: steve.mcclellan@radisys.com
Sender: nobody@netbsd.org
Reply-To: steve.mcclellan@radisys.com
To: gnats-bugs@gnats.netbsd.org
Subject: ftp/cmds.c msl() function defines a bad mode for recvrequest()
X-Send-Pr-Version: www-1.0
>Number: 16640
>Category: bin
>Synopsis: ftp/cmds.c msl() function defines a bad mode for recvrequest()
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: bin-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri May 03 20:40:00 +0000 2002
>Closed-Date: Mon May 06 14:18:47 +0000 2002
>Last-Modified: Mon May 06 14:18:47 +0000 2002
>Originator: Steve McClellan
>Release: NetBSD: cmds.c,v 1.87.2.1 2000/10/18 01:32:42 tv Exp
>Organization:
RadiSys
>Environment:
OS-9 ARMv4
>Description:
In mls() of cmds.c, only a single byte is allocated for the mode. This mode is later passed to fopen() in recvrequest(). fopen() expects a null terminated string, not a single character.
>How-To-Repeat:
3511:ftp -v ftp://stevem:stevem@cypher/
Connected to cypher.dm1.radisys.com.
220-
220 cypher.microware.com FTP server (NetBSD-ftpd 20010329) ready.
331 Password required for stevem.
230-
NetBSD 1.5.1 (GENERIC) #56: Mon Jul 2 15:54:23 CEST 2001
Welcome to NetBSD!
230 User stevem logged in.
Remote system type is UNIX.
Using binary mode to transfer files.
200 Type set to I.
ftp> mdir TEMP3 tmp
output to local-file: tmp [anpqy?]? a
Prompting off for duration of output to local-file:.
229 Entering Extended Passive Mode (|||65341|)
150 Opening ASCII mode data connection for '/bin/ls'.
ftp: local: tmp: 000:203
426 Transfer aborted. Data connection closed.
226 Abort successful
ftp> quit
221-
Data traffic for this session was 0 bytes in 0 files.
Total traffic for this session was 700 bytes in 1 transfer.
221 Thank you for using the FTP service on cypher.microware.com.
>Fix:
In ftp's cmds.c's mls(), I changed:
to:
char mode[2], *dest, *odest;
*(mode+1) = '\0'; /* bug fix to NetBSD version */
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: lukem
State-Changed-When: Mon May 6 07:18:35 PDT 2002
State-Changed-Why:
duplicate of 16642
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.