Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!necntc!ci-dandelion!ulowell!cg-atla!hildreth From: hildreth@cg-atla.UUCP (Lon Hildreth X7065) Newsgroups: comp.sources.bugs Subject: Re: MUSH bug fix Message-ID: <962@cg-atla.UUCP> Date: Tue, 20-Oct-87 13:30:29 EDT Article-I.D.: cg-atla.962 Posted: Tue Oct 20 13:30:29 1987 Date-Received: Thu, 22-Oct-87 02:36:20 EDT References: <131@dmnhack.UUCP> Reply-To: hildreth@cg-atla.UUCP (Lon Hildreth X7065) Organization: Compugraphic Corp. Wilmington, MA Lines: 26 Summary: recursion in Addstr() In article <131@dmnhack.UUCP> phb@dmnhack.UUCP writes: >I got a core dump from an infinite recursion in the function "Addstr". >A quick scan of it indicates that this might be the problem: > >line 151 of rite.c: > if (newline == '\n' && !*++s) > >Should probably be: > ++s; > if (newline == '\n' && !*s) No. Don't be too anxious with this -- clearly, the intent is to not increment 's' UNLESS 'newline == '\n'. The real fix is in copy_msg() where it checks the msg_rect.r_width/r_height to see if they are big enough to handle *any* text. Add the code in msgs.c: if (msg_rect.r_width < 2 * l_width(curfont) || msg_rect.r_height < 2 * l_height(curfont)) return; at the same place where msg_rect size is already being tested. Sorry, I can't supply diffs. -- Lon Hildreth ...!{decvax,ima,ism780c,ulowell}!cg-atla!hildreth Compugraphic Corp "You can't beat fun at the old ball park." Wilmington, MA - Harry Caray