[8717] in Athena Bugs
DECMIPS 7.3P bugs in tcsh
daemon@ATHENA.MIT.EDU (epeisach@Athena.MIT.EDU)
Fri Dec 6 09:35:24 1991
From: epeisach@Athena.MIT.EDU
Date: Fri, 6 Dec 91 09:35:10 -0500
To: bugs@Athena.MIT.EDU
There are two bugs here
a) One is a NULL pointer deref (having to do with ~ partial username
completion). sh.file.c
b) The other deals with a bug on the decstation sh.resize.c. This one is
a little tricky. Under BSD, tset sets the window size for the tty based on the
termcap entry if the window size is unknown (rows=0 and columns=0). tcsh
tries to be smart and takes the size from the tty and modifies the
TERMCAP variable accordingly to the proper size. This works nicely
expect under ultrix, where tset does not do this and leaves the window
size (in the tty structure) as 0,0, but sets the TERMCAP environment
variable correctly. csh then screws up the TERMCAP environment variable
later. (the code is only executed on the startup of csh).
The fix says if the size is 0,0 then leave the TERMCAP as it is.
You can reproduce the problem by going through the pad to a decstation,
specifying a vt100 and then trying to run emacs. I have been running
this version of tcsh for about a month without problem.
Ezra
*** /tmp/,RCSt1a01505 Fri Dec 6 09:28:57 1991
--- sh.file.c Fri Oct 18 08:08:30 1991
***************
*** 198,204 ****
char path[MAXPATHLEN];
struct stat statb;
! catn(strcpy(path, dir), file, sizeof path);
if (lstat(path, &statb) == 0) {
switch(statb.st_mode & S_IFMT) {
case S_IFDIR:
--- 198,206 ----
char path[MAXPATHLEN];
struct stat statb;
! path[0] = '\0';
! if (dir != NULL) strcpy(path, dir);
! catn(path, file, sizeof path);
if (lstat(path, &statb) == 0) {
switch(statb.st_mode & S_IFMT) {
case S_IFDIR:
*** /tmp/,RCSt1a01505 Fri Dec 6 09:28:57 1991
--- sh.resize.c Tue Sep 3 09:38:40 1991
***************
*** 62,68 ****
/* ioctl failed; not much I can do... */
return;
! if (ws.ws_row >= 10000 || ws.ws_col >= 10000)
/* the data looks bad */
return;
--- 62,68 ----
/* ioctl failed; not much I can do... */
return;
! if (ws.ws_row >= 10000 || ws.ws_col >= 10000 || ws.ws_row == 0 || ws.ws_col == 0)
/* the data looks bad */
return;