-
Bug
-
Resolution: Fixed
-
P4
-
6u6, 7
-
b50
-
generic, x86
-
generic, linux
-
Verified
When creating a DerValue with 04 00 and then try to read the content, an NPE is thrown.
The reason is that buffer is not assigned a non-null value if length == 0:
private DerInputStream init(boolean fullyBuffered, InputStream in)
throws IOException {
....
if (length == 0)
return null;
....
buffer = new DerInputBuffer(bytes);
....
}
public byte[] getOctetString() throws IOException {
byte[] bytes;
....
if (buffer.read(bytes) != length)
....
}
The reason is that buffer is not assigned a non-null value if length == 0:
private DerInputStream init(boolean fullyBuffered, InputStream in)
throws IOException {
....
if (length == 0)
return null;
....
buffer = new DerInputBuffer(bytes);
....
}
public byte[] getOctetString() throws IOException {
byte[] bytes;
....
if (buffer.read(bytes) != length)
....
}
- relates to
-
JDK-6766844 ByteArrayInputStream#read with a byte array of length 0 not consistent with InputStream when at EOF
-
- Resolved
-
-
JDK-6967112 keytool and generateCertificate() fails when user tries to use OCSP respondercertificates in jdk6u22
-
- Closed
-
-
JDK-6803376 BasicConstraintsExtension does not encode when (ca==false && pathLen<0)
-
- Closed
-