[erlang-patches] fixed reading compressed binary terms from Java

Kenneth Lundin <>
Wed Apr 25 17:45:11 CEST 2012

Den 25 apr 2012 10:48 skrev "Nico Kruber" <>:
> Problem was that when reading from an InputStream, you can only specify a
> maximum number of bytes to read. Java doesn't guarantee that it actually
> this many bytes - it could be less!
> This patch now reads up until the expected size number of bytes. If there
> more than expected, the actual number of available bytes is not printed
> probably shouldn't read the additional bytes, security-wise - the erlang
> external byte representation is broken in this case though).
What do you mean with this? Please explain. What is broken?
> I applied a patch posted on erlang-questins in September 2009, see
> http://erlang.org/pipermail/erlang-patches/2009-September/000478.html
> It was not enough to fix the bug though so I extended this patch a little.
> https://github.com/NicoK/otp/compare/jinterface.fix_compressed_binary
> Regards
> Nico Kruber
> _______________________________________________
> erlang-patches mailing list
> http://erlang.org/mailman/listinfo/erlang-patches

/Kenneth, Erlang/OTP Ericsson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-patches/attachments/20120425/8224c90e/attachment.html>

More information about the erlang-patches mailing list