Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site sequel.UUCP Path: utzoo!linus!security!genrad!decvax!microsoft!uw-beaver!tektronix!ogcvax!sequel!phil From: phil@sequel.UUCP Newsgroups: net.bugs.4bsd Subject: 4.2 BSD bug in getty Message-ID: <294@sequel.UUCP> Date: Sat, 5-Nov-83 00:14:43 EST Article-I.D.: sequel.294 Posted: Sat Nov 5 00:14:43 1983 Date-Received: Thu, 3-Nov-83 23:15:28 EST Organization: Sequent Computer Systems, Portland Lines: 26 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)