[2708] in Athena Bugs

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

null pointer bugs in tcsh

daemon@ATHENA.MIT.EDU (John T Kohl)
Fri Aug 4 17:18:18 1989

Date: Fri, 4 Aug 89 17:17:08 EDT
From: John T Kohl <jtkohl@ATHENA.MIT.EDU>
To: bugs@ATHENA.MIT.EDU
You may already have one of these (the first).

*** /tmp/,RCSt1a22438	Fri Aug  4 17:16:53 1989
--- sh.dir.c	Fri Aug  4 17:15:53 1989
***************
*** 140,146 ****
  	dp->di_next->di_prev = dp;
  flushcwd:
  	dfree(dcwd);
! 	if (strncmp(*v, "..", 2))
  	  dnewcwd(dp, 0);
  	else dnewcwd(dp, 1);		/* if starts with '..', absolute */
  }
--- 140,146 ----
  	dp->di_next->di_prev = dp;
  flushcwd:
  	dfree(dcwd);
! 	if (*v && strncmp(*v, "..", 2))
  	  dnewcwd(dp, 0);
  	else dnewcwd(dp, 1);		/* if starts with '..', absolute */
  }
***************
*** 262,268 ****
  		dcwd->di_next = dp;
  		dp->di_next->di_prev = dp;
  	}
! 	if (strncmp(*v, "..", 2))
  	  dnewcwd(dp, 0);
  	else dnewcwd(dp, 1);		/* if starts with '..', absolute */
  }
--- 262,268 ----
  		dcwd->di_next = dp;
  		dp->di_next->di_prev = dp;
  	}
! 	if (!*v || strncmp(*v, "..", 2))
  	  dnewcwd(dp, 0);
  	else dnewcwd(dp, 1);		/* if starts with '..', absolute */
  }

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