develooper Front page | perl.perl5.porters | Postings from February 2019

[perl #133770] null pointer dereference in S_regclass()

Thread Previous
From:
Karl Williamson via RT
Date:
February 16, 2019 19:48
Subject:
[perl #133770] null pointer dereference in S_regclass()
Message ID:
rt-4.0.24-19955-1550346521-1019.133770-15-0@perl.org
Now fixed by

commit c2d81cfd08d9a622c639058cd7eb870aa0991937
 Author: Karl Williamson <khw@cpan.org>
 Date:   Sat Feb 16 11:11:59 2019 -0700
 
     PATCH: [perl #133770] null pointer dereference in S_regclass()
     
     The failing case can be reduced to
     
     qr/\x{100}[\x{3030}\x{1fb2}/
     
     (It only happens on UTF-8 patterns).
     
     The bottom line is that it was assuming that there was at least one
     character that folded to 1fb2 besides itself, even though the function
     call said there weren't any such.  The solution is to pay attention to
     the function return value.
     
     I incorporated Hugo's++ patch as part of this one.
     
     However, the original test case should never have gotten this far.  The
     parser is getting passed garbage, and instead of croaking, it is somehow
     interpreting it as valid and calling the regex compiler.  I will file a
     ticket about that.


---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=133770

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About