From 9b50a3ce031fd694fa20ad36ef28a5fe9846a16c Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Tue, 17 Dec 1996 17:59:40 +0000 Subject: Fix problem in ftp and case mapping mode where the converted string wasn't terminated properly. Fix is from the PR and works for the test cases I threw at it. Should be safe and desirable for back porting to 2.2 or earlier if there are people still comitting to -stable. Submitted by: Marc Slemko Closes PR: 1864 --- usr.bin/ftp/cmds.c | 1 + 1 file changed, 1 insertion(+) diff --git a/usr.bin/ftp/cmds.c b/usr.bin/ftp/cmds.c index 9756042b5023b..371ad2e7b9c26 100644 --- a/usr.bin/ftp/cmds.c +++ b/usr.bin/ftp/cmds.c @@ -742,6 +742,7 @@ mget(argc, argv) if (mcase) { for (tp2 = tmpbuf; ch = *tp++;) *tp2++ = isupper(ch) ? tolower(ch) : ch; + *tp2 = '\0'; tp = tmpbuf; } if (ntflag) { -- cgit v1.3