-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
preg_match in inlineLink() causes segfault #352
Comments
+1, happens to us often on large documents. |
I've replaced the regex in my extensions as workaround: |
To prevent backtracking limit to be reached and to fail faster, the two patterns can be written like this:
( |
Thanks @CasimirEtHippolyte, I'll review these as soon as I have time. |
Here's the culprit:
The following
$EmRegex
also suffers from this problem:These regular expressions trigger segfaults on an 11 KB input string of mostly JSON text (~80 chars per line).
See PHP issue #45735.
I believe the regexes could be improved to prevent segfault.
The text was updated successfully, but these errors were encountered: