Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site axiom.UUCP Path: utzoo!linus!axiom!smk From: smk@axiom.UUCP (Steven M. Kramer) Newsgroups: net.bugs.4bsd Subject: "dereferencing NULL" bugs in tip for 4.2bsd Message-ID: <51@axiom.UUCP> Date: Wed, 12-Jun-85 11:17:49 EDT Article-I.D.: axiom.51 Posted: Wed Jun 12 11:17:49 1985 Date-Received: Tue, 18-Jun-85 07:37:41 EDT Organization: Axiom Technology, Newton MA Lines: 24 In remote.c, there is a point where the termcap-like parameters are obtained. As is the case with most termcap-derived programs written for the VAX, there are dereferencing problems. The old lines are: if (*RE == NULL) RE = (char *)"tip.record"; if (*EX == NULL) EX = (char *)"\t\n\b\f"; Before RE and EX are checked for NULL, they are dereferenced. The obvious fix is: /* * This is a dereferencing NULL problem. First, check * to make sure the value itself is not null. * Steve Kramer Axiom 6/11/85 */ if ((RE == NULL) || (*RE == NULL)) RE = (char *)"tip.record"; if ((EX == NULL) || (*EX == NULL)) EX = (char *)"\t\n\b\f"; -- --steve kramer {allegra,genrad,ihnp4,utzoo,philabs,uw-beaver}!linus!axiom!smk (UUCP) linus!axiom!smk@mitre-bedford (MIL)