[net.bugs.4bsd] 4.2 BSD bug in getty

phil@sequel.UUCP (11/05/83)

Bug in /usr/src/etc/getty/subr.c:

routine setchars():

 [lines]
   108		for (i = 0; charnames[i]; i++) {
   109			p = *charnames[i];
   110			if (p && *p)
   111				*charvars[i] = *p;
   112			else
   113				*charvars[i] = '\0377';  <- ** constant wrong **
   114		}

Constant '\0377' should be '\377'.  VAX compiler actually generates:
	cvtwb	$7991,(r0)
which ends up being decimal 55 (the digit '7').  The constant is declared
incorrectly.  K&R states an octal constant is a '\' followed by 1, 2, or
3 digits (not 4).  Anybody got any guesses how it got 7991 anyway?

The intent was to set disable a value by setting it to (char)-1 as 
tty(4) documents but instead sets it to a funny value.  
    **   Why is not (char) -1 used instead of '\377' anyway?  **
-- 
	Phil Hochstetler (503) 627-9811
	Sequent Computer Systems
	...!sequel!phil	(on November 1, sequel becomes sequent)