[wp-trac] [WordPress Trac] #16892: make_clickable segfault
WordPress Trac
wp-trac at lists.automattic.com
Sat Mar 19 14:51:42 UTC 2011
#16892: make_clickable segfault
--------------------------+------------------------------
Reporter: westi | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Formatting | Version: 3.1
Severity: normal | Resolution:
Keywords: needs-patch |
--------------------------+------------------------------
Comment (by hakre):
I think you've found a bug here, but I smell it not being a WordPress bug
because it's just using the preg_replace_callback() as documented.
So instead of segfaulting, PHP should give some error.
But it is segfaulting, I assume that this is related to the pcre library
code, so this should be reported upstream.
Obviously this is triggering an edge case. It contains a link that will be
larger than 10 000 characters, which would not violate HTTP but is very
uncommon (see [http://core.trac.wordpress.org/ticket/10483#comment:15
#10483]).
There is a usefull limit of 255 characters for URLs, the next usefull
limit is 2000 characters.
I could extend from 255 to 2 090 (!) by the changes in the patch. This
allows me to pass a string of about 85 690 chars into `make_clickable()`.
2 091 will again let the script die.
It does not make much of a difference btw to change to `{1,255}`, so I
opted for the longer limit.
Spaces between URLs will prevent the dying. This is really an edge-case.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/16892#comment:11>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list