[1199] in Athena Bugs

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

bug in /usr/ucb/more - Dereferenced pointer.

daemon@ATHENA.MIT.EDU (Chris D. Peterson)
Wed Oct 19 16:35:41 1988

To: bugs@ATHENA.MIT.EDU
Date: Wed, 19 Oct 88 16:18:16 EDT
From: Chris D. Peterson <kit@ATHENA.MIT.EDU>

I was using the current source on paris to build this, so it
is a bug in all our code I would guess.

I was using saber to try to figure out how more did something, and ran
across this:

"/source/4.3/ucb/more/more.c":761, tailequ(), Dereference (Error #67)
   760:         while (tail >= path)
 * 761:                 if (*(--tail) == '/')
   762:                         break;

------------------------------------------------------------

listing of: "/source/4.3/ucb/more/more.c"

   755: register char *string;
   756: {
   757:         register char *tail;
   758: 
   759:         tail = path + strlen(path);
   760:         while (tail >= path)
   761:                 if (*(--tail) == '/')
   762:                         break;
   763:         ++tail;
   764:         while (*tail++ == *string++)
   765:               if (*tail == '\0')

------------------------------------------------------------

(break 1) 30 -> path;
(char *) 0x12fb20 "a.out"
(break 1) 31 -> tail;
(char *) 0x12fb1f /* before start of: <data> */

------------------------------------------------------------

Saber is right of course,  I will let the "experts" find the correct
fix for this.  But I am surprised that the RT's don't die on this.

					Chris

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