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 <marcs@znep.com>
Closes PR:	1864
This commit is contained in:
Warner Losh 1996-12-17 17:59:40 +00:00
parent d07d447b29
commit 9b50a3ce03

View File

@ -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) {