=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/rlogin/Attic/rlogin.c,v retrieving revision 1.3 retrieving revision 1.4 diff -c -r1.3 -r1.4 *** src/usr.bin/rlogin/Attic/rlogin.c 1996/04/17 07:15:21 1.3 --- src/usr.bin/rlogin/Attic/rlogin.c 1996/06/19 10:03:43 1.4 *************** *** 256,265 **** exit(1); } ! (void)strcpy(term, (p = getenv("TERM")) ? p : "network"); if (tcgetattr(0, &tty) == 0) { ! (void)strcat(term, "/"); ! (void)sprintf(term + strlen(term), "%d", cfgetospeed(&tty)); } (void)get_window_size(0, &winsize); --- 256,275 ---- exit(1); } ! (void)strncpy(term, (p = getenv("TERM")) ? p : "network", ! sizeof(term) - 1); ! term[sizeof(term) - 1] = '\0'; ! ! /* ! * Add "/baud" only if there is room left; ie. do not send "/19" ! * for 19200 baud with a particularily long $TERM ! */ if (tcgetattr(0, &tty) == 0) { ! char baud[20]; /* more than enough.. */ ! ! (void)sprintf(baud, "/%d", cfgetospeed(&tty)); ! if (strlen(term) + strlen(baud) < sizeof(term) - 1) ! (void)strcat(term, baud); } (void)get_window_size(0, &winsize);