Lines 507-513
Link Here
|
507 |
#endif |
507 |
#endif |
508 |
nwin = nwin_undef; |
508 |
nwin = nwin_undef; |
509 |
nwin_options = nwin_undef; |
509 |
nwin_options = nwin_undef; |
510 |
strcpy(screenterm, "screen"); |
510 |
strncpy(screenterm, "screen", MAXTERMLEN); |
|
|
511 |
screenterm[MAXTERMLEN] = '\0'; |
511 |
#ifdef BUILTIN_TELNET |
512 |
#ifdef BUILTIN_TELNET |
512 |
af = AF_UNSPEC; |
513 |
af = AF_UNSPEC; |
513 |
#endif |
514 |
#endif |
Lines 689-696
Link Here
|
689 |
case 'T': |
690 |
case 'T': |
690 |
if (--ac == 0) |
691 |
if (--ac == 0) |
691 |
exit_with_usage(myname, "Specify terminal-type with -T", NULL); |
692 |
exit_with_usage(myname, "Specify terminal-type with -T", NULL); |
692 |
if (strlen(*++av) < 20) |
693 |
if (strlen(*++av) < MAXTERMLEN) { |
693 |
strcpy(screenterm, *av); |
694 |
strncpy(screenterm, *av, MAXTERMLEN); |
|
|
695 |
screenterm[MAXTERMLEN] = '\0'; |
696 |
} |
694 |
else |
697 |
else |
695 |
Panic(0, "-T: terminal name too long. (max. 20 char)"); |
698 |
Panic(0, "-T: terminal name too long. (max. 20 char)"); |
696 |
nwin_options.term = screenterm; |
699 |
nwin_options.term = screenterm; |
Lines 1034-1040
Link Here
|
1034 |
|
1037 |
|
1035 |
if ((attach_term = getenv("TERM")) == 0 || *attach_term == 0) |
1038 |
if ((attach_term = getenv("TERM")) == 0 || *attach_term == 0) |
1036 |
Panic(0, "Please set a terminal type."); |
1039 |
Panic(0, "Please set a terminal type."); |
1037 |
if (strlen(attach_term) > sizeof(D_termname) - 1) |
1040 |
if (strlen(attach_term) > MAXTERMLEN) |
1038 |
Panic(0, "$TERM too long - sorry."); |
1041 |
Panic(0, "$TERM too long - sorry."); |
1039 |
GetTTY(0, &attach_Mode); |
1042 |
GetTTY(0, &attach_Mode); |
1040 |
#ifdef DEBUGGGGGGGGGGGGGGG |
1043 |
#ifdef DEBUGGGGGGGGGGGGGGG |