diff options
author | Michael Santos <[email protected]> | 2010-04-20 12:12:41 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2010-04-20 14:18:54 +0200 |
commit | 78a48004ed9e488de702baa63763ce6e6b602a93 (patch) | |
tree | 0866c54387f8d568078cd6c1b002d628f14ceadb /erts/emulator/pcre/pcre_valid_utf8.c | |
parent | 09ca69e2247860fb5494297279c8819a34777cc6 (diff) | |
download | otp-78a48004ed9e488de702baa63763ce6e6b602a93.tar.gz otp-78a48004ed9e488de702baa63763ce6e6b602a93.tar.bz2 otp-78a48004ed9e488de702baa63763ce6e6b602a93.zip |
re: Fix non-termination for a certain regular expression
The following code never terminates:
fail() ->
Str = "http:/www.flickr.com/slideShow/index.gne?group_id=&user_id=69845378@N0",
EMail_regex = "[a-z0-9!#$%&'*+/=?^_`{|}~-]+"
++ "(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*"
++ "@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+"
++ "(?:[a-zA-Z]{2}|com|org|net|gov|mil"
++ "|biz|info|mobi|name|aero|jobs|museum)",
io:format("about to run...~n"),
Ret = re:run(Str, EMail_regex),
io:format("Ret is ~p~n", [Ret]).
Fix it by having pcre_exec remember match_call_count between restarts.
Reported-by: Gordon Guthrie
Acked-by: Patrik Nyblom
Diffstat (limited to 'erts/emulator/pcre/pcre_valid_utf8.c')
0 files changed, 0 insertions, 0 deletions