Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/5/84; site mordor.UUCP Path: utzoo!watmath!clyde!burl!ulysses!bellcore!decvax!decwrl!amdcad!lll-crg!mordor!jdb From: jdb@mordor.UUCP (John Bruner) Newsgroups: net.micro.mac Subject: bug in UW server (with fix) Message-ID: <5982@mordor.UUCP> Date: Wed, 19-Mar-86 11:08:22 EST Article-I.D.: mordor.5982 Posted: Wed Mar 19 11:08:22 1986 Date-Received: Sat, 22-Mar-86 03:17:55 EST Distribution: net Organization: S-1 Project, LLNL Lines: 35 In recent private correspondence, Mike Meyer pointed out a bug in the UW server. When I looked into it, I discovered another (even more embarrassing) bug. Both of the bugs are in the routine "mxmit()". The declaration: register char *cp, *cq, i; register int len; should be changed to register char *cp, *cq; register int i, len; "i" must be an "int" because it is set to (and tested for) the value -1. (I am amazed that this worked.) Further down there is some code: if (*cp == RUB || *cp < ' ') { i = sizeof ctlch; This should be if (*cp == RUB || *cp < ' ') { i = sizeof ctlch / sizeof ctlch[0] - 1; since "ctlch" is an array of "int" and the loop is supposed to run backwards from the last to the first element of that array. Many thanks to Mike for finding this. -- John Bruner (S-1 Project, Lawrence Livermore National Laboratory) MILNET: jdb@mordor [jdb@s1-c.ARPA] (415) 422-0758 UUCP: ...!ucbvax!dual!mordor!jdb ...!seismo!mordor!jdb