Date: Thu, 25 Jul 1996 11:28:40 -0700 (PDT) From: Paul Traina <pst> To: freebsd-security Subject: rlogin.c patch (official) Message-ID: <199607251828.LAA19515@freefall.freebsd.org>
index | next in thread | raw e-mail
Index: rlogin.c
===================================================================
RCS file: /home/ncvs/src/usr.bin/rlogin/rlogin.c,v
retrieving revision 1.10
retrieving revision 1.12
diff -c -r1.10 -r1.12
*** rlogin.c 1996/02/11 09:18:18 1.10
--- rlogin.c 1996/07/25 18:27:40 1.12
***************
*** 102,107 ****
--- 102,108 ----
char *speeds[] = {
"0", "50", "75", "110", "134", "150", "200", "300", "600", "1200",
"1800", "2400", "4800", "9600", "19200", "38400", "57600", "115200"
+ #define MAX_SPEED_LENGTH (sizeof("115200") - 1)
};
#ifdef OLDSUN
***************
*** 259,265 ****
exit(1);
}
! (void)strcpy(term, (p = getenv("TERM")) ? p : "network");
if (ioctl(0, TIOCGETP, &ttyb) == 0) {
(void)strcat(term, "/");
(void)strcat(term, speeds[(int)ttyb.sg_ospeed]);
--- 260,270 ----
exit(1);
}
! #define MAX_TERM_LENGTH (sizeof(term) - 1 - MAX_SPEED_LENGTH - 1)
!
! (void)strncpy(term, (p = getenv("TERM")) ? p : "network",
! MAX_TERM_LENGTH);
! term[MAX_TERM_LENGTH] = '\0';
if (ioctl(0, TIOCGETP, &ttyb) == 0) {
(void)strcat(term, "/");
(void)strcat(term, speeds[(int)ttyb.sg_ospeed]);
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199607251828.LAA19515>
