[erlang-patches] re:run sometimes executed on corrupted data

Björn Gustavsson <>
Mon Jan 4 13:19:02 CET 2010


On Thu, Dec 24, 2009 at 9:33 AM, YAMASHINA Hio <> wrote:
> Following snnipet
>
>  case re:run(Data, "[\\x00\\x01]", [{capture,[0],binary}]) of
>  nomatch ->
>    ok;
>  {match,X} ->
>    throw({"source text", Data, "contains invalid sequence", X})
>  end,
>
> rarely raises strange excepion
>
>  {"source text",<<"xxx!x">>,"contains invalid sequence",[<<"!">>]}

Thanks for the bug report and patch. We will investigate the problem.


If you plan to send more patches, please read our patch submission
guidelines:

http://wiki.github.com/erlang/otp/submitting-patches

-- 
Björn Gustavsson, Erlang/OTP, Ericsson AB


More information about the erlang-patches mailing list