commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dapeng Sun (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (CRYPTO-125) CryptoOutputStream does not call write in a loop when underlying channel works in non-block mode.
Date Wed, 26 Oct 2016 08:05:58 GMT

     [ 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 <junjie.j.chen@intel.com>
Authored: Mon Oct 24 10:11:29 2016 +0800
Committer: Sun Dapeng <sdp@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)

Mime
View raw message