Uploaded image for project: 'Commons Crypto'
  1. Commons Crypto
  2. CRYPTO-125

CryptoOutputStream does not call write in a loop when underlying channel works in non-block mode.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.0.0
    • 1.1.0
    • Stream
    • None
    • Important

    Description

      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);
      }

      Attachments

        Activity

          People

            junjie Junjie Chen
            junjie Junjie Chen
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: