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