diff options
author | Karl Williamson <khw@cpan.org> | 2016-02-10 16:27:13 -0700 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2016-02-10 21:16:43 -0700 |
commit | cfbef7dc3bfb89e4ed2c00ea9c9e3bcfd0b170fd (patch) | |
tree | 925bd3a138ea1fad8346715d507ac8baf4131460 /pod/perldiag.pod | |
parent | 6421685ecc2e22ca71451c4a545a2a2593260491 (diff) | |
download | perl-cfbef7dc3bfb89e4ed2c00ea9c9e3bcfd0b170fd.tar.gz |
regcomp.c: Fix some parsing glitches
I undertook a code review of how regcomp.c parses things in light of the
tickets found by the fuzzer,
https://rt.perl.org/Ticket/Display.html?id=126546. This commit is the
result of my efforts so far. I was not planning to push it now, but the
work found a couple of new error messages that should be raised, and
this has to be done before the visible changes code freeze coming up all
too soon. I will add test cases after that freeze, including if to see
that these changes fix all the observed issues.
The audit was tedious, and may have missed some things. Several issues
occurred in multiple places. One is to not advance the parse by
UTF8SKIP appropriately; another is to subtract one byte from the parse
and assume that that is pointing to the beginning of the previous
character (which under UTF-8 it may not). Another is to assume that
that the pattern is a C string, that there are no interior NULs in it.
I also found unnecessary tests, given that an SV always has a
terminating NUL.
Diffstat (limited to 'pod/perldiag.pod')
-rw-r--r-- | pod/perldiag.pod | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/pod/perldiag.pod b/pod/perldiag.pod index 80a125e5b4..35d3edba3d 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -5343,6 +5343,18 @@ m/%s/ closing parenthesis after the name. The S<<-- HERE> shows whereabouts in the regular expression the problem was discovered. +=item Sequence (?PE<lt>... not terminated in regex; marked by S<<-- HERE> in m/%s/ + +(F) A named group of the form C<(?PE<lt>...E<gt>')> was missing the final +closing angle bracket. The S<<-- HERE> shows whereabouts in the +regular expression the problem was discovered. + +=item Sequence (?PE<gt>... not terminated in regex; marked by S<<-- HERE> in m/%s/ + +(F) A named reference of the form C<(?PE<gt>...)> was missing the final +closing parenthesis after the name. The S<<-- HERE> shows whereabouts +in the regular expression the problem was discovered. + =item Sequence (?R) not terminated in regex m/%s/ (F) An C<(?R)> or C<(?0)> sequence in a regular expression was missing the |