in reply to Re: how to restrict a regexp?
in thread how to restrict a regexp?
It's also possible to create a regexp that crashes Perl
There was a buffer overflow under some conditions that involve Unicode in the pattern, and a string that is matched against the pattern not being upgraded correctly.
There were patches for that overflow, and most operating systems should have been updated by now.
But it demonstrates that regexes are still a bit more fragile than normal scalars, and thus you should be extra carefull.
The only reliable way around regexes that take exponential time is to restrict the search time, and kill the process if it doesn't stop.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: how to restrict a regexp?
by tfoertsch (Beadle) on Mar 17, 2008 at 12:15 UTC | |
by Your Mother (Archbishop) on Mar 17, 2008 at 16:47 UTC | |
by ikegami (Patriarch) on Mar 17, 2008 at 23:45 UTC |