[erlang-bugs] ei_decode_list_header and big lists
Björn-Egil Dahlberg
egil@REDACTED
Fri May 20 10:44:34 CEST 2011
On 2011-05-20 02:59, Olivier Girondel wrote:
> What if...
>
> I send a big list (eg, 80000 elements) to a C-port ?
>
> According to
> http://www.erlang.org/doc/man/ei.html#ei_decode_list_header
>
> the list length will be stored into an "int",
> which obviously will lead to strange behavior ?
Well, the length should probably be stored as an Uint32 in ei but it
isn't, clearly a miss. An int on most C compilers will be a signed
32-bit integer, so all the bits and pieces will be there. But, with the
wrong type ...
Reference, http://www.erlang.org/doc/apps/erts/erl_ext_dist.html
Regards,
Björn-Egil
More information about the erlang-bugs
mailing list