Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8323562

SaslInputStream.read() may return wrong value

XMLWordPrintable

    • b06
    • generic
    • generic

        The "com.sun.jndi.ldap.sasl.SaslInputStream" class has this code:

            public int read() throws IOException {
                byte[] inBuf = new byte[1];
                int count = read(inBuf, 0, 1);
                if (count > 0) {
                    return inBuf[0];
                } else {
                    return -1;
                }
            }

        SaslInputStream.read() should return a value in the range from 0 to 255 per the spec of InputStream.read() but it returns the signed byte from the inBuf as is.

              serb Sergey Bylokhov
              serb Sergey Bylokhov
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: