WhisperSystems/TextSecure — pull request #421 by wsot (2013-11-12 02:07:41+00:00)
Title: Fix issue #410: DecryptingPartInputStream could return more data than re...

This change buffers data coming from a _cipher.update_ call if more data is returned than requested (larger than the _length_ passed to the _read_ call) and uses the buffer on subsequent _read_ calls (until empty).
I'm not that great with Java so there may be a much more efficient way of doing the array handling, but it does work on KK.