From root@cisco.it  Tue Oct 22 05:38:17 1996
Received: from cisco.it ([194.183.8.2])
          by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id FAA26158
          for <FreeBSD-gnats-submit@freebsd.org>; Tue, 22 Oct 1996 05:38:09 -0700 (PDT)
Received: (from root@localhost) by cisco.it (8.7.5/8.7.3) id OAA00307; Tue, 22 Oct 1996 14:35:25 +0200 (MET DST)
Message-Id: <199610221235.OAA00307@cisco.it>
Date: Tue, 22 Oct 1996 14:35:25 +0200 (MET DST)
From: A.Nati@cisco.it
To: FreeBSD-gnats-submit@freebsd.org
Subject: FTP case mapping during MGET
X-Send-Pr-Version: 3.2

>Number:         1864
>Category:       bin
>Synopsis:       FTP case mapping during MGET
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Oct 22 05:40:01 PDT 1996
>Closed-Date:    Tue Dec 17 10:59:51 MST 1996
>Last-Modified:  Tue Dec 17 11:01:21 MST 1996
>Originator:     Antonio Nati A.Nati@cisco.it
>Release:        FreeBSD 2.1-STABLE i386
>Organization:
<>
>Environment:

	Problem found with FTP client on a NT FTPD server or FreeBSD FTPD
	server

>Description:

	When transferring with mget and case mapping on, the resulting file
	name is wrong; the original file-name is padded with other characters
	following the original name.

>How-To-Repeat:

	Simply, open an FTP session toward a remote host that has
	some files with UPPERCASEd names. Do a case command in order to enable
	the case mapping (uppercase -> lowercase), do a mget * command and
	pick-up some remote files. Watch the result!

>Fix:
	
	I didn't examine the code. I may be available to fix the problem,
	if none is working closely on FTP.

>Release-Note:
>Audit-Trail:

From: Marc Slemko <marcs@znep.com>
To: A.Nati@cisco.it
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: bin/1864: FTP case mapping during MGET
Date: Tue, 22 Oct 1996 09:28:22 -0600 (MDT)

 On Tue, 22 Oct 1996 A.Nati@cisco.it wrote:
 
 > >Description:
 > 
 > 	When transferring with mget and case mapping on, the resulting file
 > 	name is wrong; the original file-name is padded with other characters
 > 	following the original name.
 
 Below is a patch against -stable that will fix this one.  The code doesn't
 seem to have changed in -current.
 
 I would suggest that there are likely other cases where the exact same
 thing happens; the whole case conversion code in ftp seems like a big
 mess, sometimes using one way of doing things, sometimes another.
 
 *** /usr/src/usr.bin/ftp/cmds.c	Sat Aug 26 01:27:46 1995
 --- cmds.c	Tue Oct 22 09:17:35 1996
 ***************
 *** 742,747 ****
 --- 742,748 ----
   			if (mcase) {
   				for (tp2 = tmpbuf; ch = *tp++;)
   					*tp2++ = isupper(ch) ? tolower(ch) : ch;
 + 				*tp2 = '\0';
   				tp = tmpbuf;
   			}
   			if (ntflag) {
 
State-Changed-From-To: open->closed 
State-Changed-By: imp 
State-Changed-When: Tue Dec 17 10:59:51 MST 1996 
State-Changed-Why:  

Applied Marc's patch from this PR, the problem was fixed, so it should be 
closed 
>Unformatted:

imp says:
Marc's patch works, so I'm committing this.  Fixed in rev 1.6 of cmds.c
