From owner-cvs-all Sun Jul 9 10:45:38 2000 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 0B39C37B53A; Sun, 9 Jul 2000 10:45:31 -0700 (PDT) (envelope-from dcs@FreeBSD.org) Received: (from dcs@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id KAA63388; Sun, 9 Jul 2000 10:45:30 -0700 (PDT) (envelope-from dcs@FreeBSD.org) Message-Id: <200007091745.KAA63388@freefall.freebsd.org> From: "Daniel C. Sobral" Date: Sun, 9 Jul 2000 10:45:30 -0700 (PDT) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/lib/libc/regex regcomp.c X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG dcs 2000/07/09 10:45:30 PDT Modified files: lib/libc/regex regcomp.c Log: altoffset() always returned whenever it recursed, because at the end of the processing of the recursion, "scan" would be pointing to O_CH (or O_QUEST), which would then be interpreted as being the end character for altoffset(). We avoid this by properly increasing scan before leaving the switch. Without this, something like (a?b?)?cc would result in a g->moffset of 1 instead of 2. I added a case to the soon-to-be-imported regex(3) test code to catch this error. Revision Changes Path 1.23 +5 -1 src/lib/libc/regex/regcomp.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message