Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix panics parsing regex with whitespace in extended mode #349
The added tests fail without the fix like this:
The reason for the panics is that
Found using cargo-fuzz.
The fuzz script is here (not sure if you would want to merge that or not): master...robinst:add-cargo-fuzz-script
You can run it using
The artifact that it returned was this:
@robinst Thanks for finding this! Sorry it slipped out of my queue, but your blog post caught my attention. :-) Nice work!
I'm not sure the fix is right either. Does this also apply to thinks like
Yes, and things like
Maybe whitespace should only be allowed between logical groups of characters. For example, it should not be allowed within a number or within a text identifier. Here's what other engines do:
Perl behaves the same way, checked with
So at least for