This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regcomp.c: Fix recursive parsing bug
authorKarl Williamson <khw@cpan.org>
Tue, 9 Feb 2016 21:00:23 +0000 (14:00 -0700)
committerKarl Williamson <khw@cpan.org>
Wed, 10 Feb 2016 06:30:54 +0000 (23:30 -0700)
commitd8fd4ea0c782a6d356681b28eb35e215d74e4ccd
tree387ad74608679871c0e2ed7c80ed814c10a0718a
parent85119b3f1d6ce8355c36cf733fc34040686c4a5c
regcomp.c: Fix recursive parsing bug

In certain cases, regex compilation will use a substitute input string
when parsing what it thinks is a bracketed character class /[ ... ] /.
The substitute automatically had a ']' appended to it, even if the
original didn't have one, leading to wrong results.

I did not add a test for this, as the next commit causes current tests
to fail if this one isn't done.
regcomp.c