You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Junjie Chen (JIRA)" <ji...@apache.org> on 2016/10/17 03:36:59 UTC
[jira] [Updated] (CRYPTO-125) CryptoOutpuStream does not call write
in a loop when underlying channel works in non-block mode.
[ https://issues.apache.org/jira/browse/CRYPTO-125?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Junjie Chen updated CRYPTO-125:
-------------------------------
Summary: CryptoOutpuStream does not call write in a loop when underlying channel works in non-block mode. (was: CryptoOutpuStream does not call write in a loop when underlying channel is socketchannel)
> CryptoOutpuStream does not call write in a loop when underlying channel works in non-block mode.
> ------------------------------------------------------------------------------------------------
>
> Key: CRYPTO-125
> URL: https://issues.apache.org/jira/browse/CRYPTO-125
> Project: Commons Crypto
> Issue Type: Bug
> Components: Stream
> Affects Versions: 1.0.0
> Reporter: Junjie Chen
>
> The encrypt function call output.write without loop which lead to data loss when creating the output encryption stream with a SocketChannel and works in non-block mode.
> As suggested, it should be call as following way:
> while(buf.hasRemaining()) {
> channel.write(buf);
> }
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)