[erlang-bugs] Crash in SSL-connection format_reply R13B04

Ingela Anderton Andin ingela@REDACTED
Tue Nov 2 17:35:54 CET 2010


Hi!

This is fixed in R14B.

Regards Ingela Erlang/OTP -team Ericsson AB

Henrik Nord wrote:
> We get a crash in ssl_connection when trying to receive an http packet:
>
> Here are some traces:
>
> call ssl_connection:format_reply({socket_options,list,http,0,0,false},{http_request,'GET',{abs_path,"/"},{1,1}})
> (<0.659.0>) call ssl_connection:format_reply(list,0,{http_request,'GET',{abs_path,"/"},{1,1}})
> (<0.659.0>) exception_from {ssl_connection,format_reply,3} {error,badarg}
> (<0.659.0>) exception_from {ssl_connection,format_reply,2} {error,badarg}
> *failed*
> ::exit:{econnrefused,[{lhttpc_client,send_request,1},
>                     {lhttpc_client,execute,9},
>                     {lhttpc_client,request,9}]}
>   in function lhttpc:request/9
>   in call from tl_async:'-call/3-fun-0-'/3
>
>
> (<0.659.0>) call ssl_connection:terminate({badarg,[{erlang,binary_to_list,[{http_request,'GET',{abs_path,"/"},{1,1}}]},
>          {ssl_connection,format_reply,3},
>          {ssl_connection,format_reply,2},
>          {ssl_connection,deliver_app_data,4},
>          {ssl_connection,application_data,2},
>          {ssl_connection,handle_event,3},
>
>
> Relevant Code:
> in ssl_connection.erl
> format_reply(list,     _, Data) ->  binary_to_list(Data);
> format_reply(binary,   0, Data) ->  Data;
> format_reply(binary, raw, Data) ->  Data;
> format_reply(binary,   N, Data) ->  % Header mode
>     <<Header:N/binary, Rest/binary>> = Data,
>     [binary_to_list(Header), Rest].
>
>
> Is this already fixed in R14, and/or can we get a patch for R13B04 ?
>
> Thanks
>   





More information about the erlang-bugs mailing list