From owner-freebsd-bugs Wed Jan 31 01:46:59 1996 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id BAA05597 for bugs-outgoing; Wed, 31 Jan 1996 01:46:59 -0800 (PST) Received: from karon.dynas.se (karon.dynas.se [192.71.43.4]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id BAA05581 for ; Wed, 31 Jan 1996 01:46:50 -0800 (PST) Received: from spirit.dynas.se by karon.dynas.se with smtp (Smail3.1.28.1 #5) id m0thZ7l-000EUPC; Wed, 31 Jan 96 10:46:45 +0100 Received: by spirit.dynas.se (Smail3.1.28.1 #32) id m0thZ7m-000JeVC; Wed, 31 Jan 96 10:46:46 +0100 Date: Wed, 31 Jan 1996 10:46:44 +0100 (MET) From: Mikko Tyolajarvi To: bugs@FreeBSD.org Subject: iijppp (2.1-RELEASE). Chatscript buglet. Message-ID: MIME-Version: 1.0 Content-Type: Text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: Quoted-Printable Sender: owner-bugs@FreeBSD.org Precedence: bulk In case anyone is interested, I stumbled into this cute bug in user ppp (from the 2.1-RELEASE CD). It causes chatscripts to fail to to match any string that is immediately preceeded by a leading substring of itself. I.e. when expecting "FooBar", "FooFooBar" will pass by unnoticed, or (ho= w I found out), it is not possible to wait for a "Password:" prompt using th= e string "sword:"... Here is one way to fix it: *** chat.c.org Fri Jan 19 13:06:00 1996 --- chat.c Fri Jan 19 13:06:53 1996 *************** *** 266,272 **** return(MATCH); } } else { ! s =3D str; if (inp =3D=3D inbuff+ IBSIZE) { bcopy(inp - 100, inbuff, 100); inp =3D inbuff + 100; --- 266,272 ---- return(MATCH); } } else { ! s =3D (ch =3D=3D *str) ? str+1 : str; if (inp =3D=3D inbuff+ IBSIZE) { bcopy(inp - 100, inbuff, 100); inp =3D inbuff + 100; BTW: The chat program doesn't have this problem. =09=09Regards, =09=09/Mikko Mikko Ty=F6l=E4j=E4rvi (mikko@dynas.se) DynaSoft, Dynamic Software AB