You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Dapeng Sun (JIRA)" <ji...@apache.org> on 2016/10/26 08:05:58 UTC

[jira] [Resolved] (CRYPTO-125) CryptoOutputStream 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 ]

Dapeng Sun resolved CRYPTO-125.
-------------------------------
    Resolution: Fixed

Thank Junjie for the contribution.

Repository: commons-crypto
Updated Branches:
  refs/heads/master 77af2da3d -> 3adc20723


CRYPTO-125: CryptoOutputStream does not call write in a loop when underlying channel works in non-block mode. (Reviewed by Sun, Dapeng and Ke, Xianda)

Closes #71 from cjjnjust:master


Project: http://git-wip-us.apache.org/repos/asf/commons-crypto/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-crypto/commit/3adc2072
Tree: http://git-wip-us.apache.org/repos/asf/commons-crypto/tree/3adc2072
Diff: http://git-wip-us.apache.org/repos/asf/commons-crypto/diff/3adc2072

Branch: refs/heads/master
Commit: 3adc20723b823bad58a39f7952300538450d3b7c
Parents: 77af2da
Author: Junjie Chen <ju...@intel.com>
Authored: Mon Oct 24 10:11:29 2016 +0800
Committer: Sun Dapeng <sd...@apache.org>
Committed: Mon Oct 24 10:12:29 2016 +0800


> CryptoOutputStream 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
>            Assignee: Junjie Chen
>             Fix For: 1.1.0
>
>
> 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)