[erlang-questions] binary_to_term and Leaking Atoms
Fri Oct 2 09:37:58 CEST 2009
There is always the obvious solution: decode the binary yourself and use
XXX_to_existing_atom to be safe. It won't be as fast but the binary encoding
is relativly straight forward and shouldn't cause any problems.
2009/10/2 Jayson Vantuyl <>
> That works if I was just sending an atom as a binary, but I was hoping to
> send whole data structures using term_to_binary. Looks like there's no way
> to make that atom safe, then?
> On Oct 1, 2009, at 9:46 PM, Max Lapshin wrote:
> There are erlang:binary_to_existing_atom/2,
> Jayson Vantuyl
> erlang-questions mailing list. See http://www.erlang.org/faq.html
> erlang-questions (at) erlang.org
More information about the erlang-questions