Uploaded image for project: 'MINA SSHD'
  1. MINA SSHD
  2. SSHD-84

ChannelPipedInputStream.read() incorrect sign extension in result

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 0.3.0
    • None
    • None

    Description

      java.io.InputStream.read() defines its result as an int in the range 0 to 255 (except EOF which is -1). But current org.apache.sshd.common.channel.ChannelPipedInputStream.read() implementation makes sign extension for byte values greater than 127 (by `return b[0]`). This should be fixed by proper masking of read() result value (`return b[0] & 0xff`).

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              kapyar Victor Antonovich
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: