[8427] in Athena Bugs

home help back first fref pref prev next nref lref last post

Re: /bin/csh 7.3P decmips

daemon@ATHENA.MIT.EDU (epeisach@Athena.MIT.EDU)
Fri Oct 18 08:13:50 1991

From: epeisach@Athena.MIT.EDU
Date: Fri, 18 Oct 91 08:14:46 -0400
To: bugs@Athena.MIT.EDU
Cc: jh@Athena.MIT.EDU, tytsto@Athena.MIT.EDU, wwchung@Athena.MIT.EDU


Here's the fix. It's the usuall NULL pointer deref.

Note in regards to the bug report, let's be accurate. On the RS/6000
/bin/athena/tcsh isa symlink to csh which is not ours. It doesn't even
support that completion, so I don't know how the RS/6000 was used as a
data point.

RCS file: RCS/sh.file.c,v
retrieving revision 1.1
diff -c -r1.1 sh.file.c
*** /tmp/,RCSt1a07578	Fri Oct 18 08:11:29 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:

home help back first fref pref prev next nref lref last post