MINA SSHD
  1. MINA SSHD
  2. SSHD-84

ChannelPipedInputStream.read() incorrect sign extension in result

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: 0.3.0
    • Fix Version/s: None
    • Labels:
      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`).

        Issue Links

          Activity

          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Closed Closed
          2d 5h 55m 1 Guillaume Nodet 28/Apr/10 19:27
          Guillaume Nodet made changes -
          Status Open [ 1 ] Closed [ 6 ]
          Resolution Duplicate [ 3 ]
          Guillaume Nodet made changes -
          Field Original Value New Value
          Link This issue duplicates SSHD-79 [ SSHD-79 ]
          Hide
          Bill Kuker added a comment -

          Dupe of SSHD-79

          Show
          Bill Kuker added a comment - Dupe of SSHD-79
          Victor Antonovich created issue -

            People

            • Assignee:
              Unassigned
              Reporter:
              Victor Antonovich
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development