From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id F34083858413; Tue, 28 Sep 2021 01:22:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F34083858413 From: "marlenesanchez231+jaime at gmail dot com" To: glibc-bugs-regex@sourceware.org Subject: [Bug regex/25322] regex mishandles back-references inside interval expressions Date: Tue, 28 Sep 2021 01:22:53 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: regex X-Bugzilla-Version: 2.30 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: marlenesanchez231+jaime at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: security- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: glibc-bugs-regex@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-bugs-regex mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Sep 2021 01:22:54 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D25322 --- Comment #52 from Chris James = --- C program illustrating bug with back-references inside intervals https://babyblue1984.tumblr.com/ https://lilysinthefall.tumblr.com/ https://never-gonna-be-alone-sz.tumblr.com/ https://bipolvrsunshine.tumblr.com/ https://youareatypo.tumblr.com/ The glibc regular expression code mishandles regular expressions such as: .*((.)\2){2}$ as it does not backtrack enough to find a match that satisfies the back-references when they are used twice. https://nymphs-in-gardens.tumblr.com/ https://sophiexbx.tumblr.com/ https://benderindeniz.tumblr.com/ https://he1943.tumblr.com/ https://jamischwin.tumblr.com/ To reproduce the problem, compile and run the attached file backrefbug.c. It will exit with status 2, whereas the correct exit status is 0. This bug was originally reported against GNU 'grep' her https://enchantedkisses.tumblr.com/ https://gentle-man1.tumblr.com/ https://estheeeeeerl.tumblr.com/ https://itsawanderful-life.tumblr.com/ https://comradicaltomatoboss.tumblr.com/ --=20 You are receiving this mail because: You are on the CC list for the bug.=