Branch: refs/heads/blead
  Home:   https://github.com/Perl/perl5
  Commit: 907b053a38c60dd5db062badbece92aff8665b87
      
https://github.com/Perl/perl5/commit/907b053a38c60dd5db062badbece92aff8665b87
  Author: Karl Williamson <k...@cpan.org>
  Date:   2025-03-02 (Sun, 02 Mar 2025)

  Changed paths:
    M regexec.c

  Log Message:
  -----------
  regrepeat: Use new utf8_to_uv_or_die; not utf8_to_uvchr_buf

This is a subtle bug fix when the input is malformed UTF-8.  We say we
don't support malformed, but this commit is a step towards better
protecting against that eventuality.

Prior to this commit, some patterns that use regrepeat() would exhibit
different matching behavior of malformed input depending on if utf8
warnings were enabled or not.

This is because utf8_to_uvchr_buf() returns NUL if utf8 warnings are on;
and the REPLACEMENT CHARACTER if they are off.  If the match criteria
accepts one but not the other, the behavior would differ.

Now, malformed input is treated as a runtime error, like division by 0.



To unsubscribe from these emails, change your notification settings at 
https://github.com/Perl/perl5/settings/notifications

Reply via email to