Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8183731 | 8u161 | Ivan Gerasimov | P4 | Resolved | Fixed | b01 |
JDK-8165309 | 8u152 | Ivan Gerasimov | P4 | Resolved | Fixed | b01 |
JDK-8192467 | emb-8u161 | Ivan Gerasimov | P4 | Resolved | Fixed | b01 |
An output stream 'es' can be obtained as encoder.wrap(os).
Normally, es.write(buf, off, len) throws IndexOutOfBoundException, if the referenced portion lies outside the buffer. In this case, nothing is written to the underlying output stream 'os'.
However, if (off + len) numerically overflows, then the call to write() will produce some output and only when reached the boundary of the buf will throw the exception.
This behavior looks inconsistent.
Normally, es.write(buf, off, len) throws IndexOutOfBoundException, if the referenced portion lies outside the buffer. In this case, nothing is written to the underlying output stream 'os'.
However, if (off + len) numerically overflows, then the call to write() will produce some output and only when reached the boundary of the buf will throw the exception.
This behavior looks inconsistent.
- backported by
-
JDK-8165309 Base64.Encoder.wrap(os).write(byte[],int,int) with incorrect arguments should not produce output
-
- Resolved
-
-
JDK-8183731 Base64.Encoder.wrap(os).write(byte[],int,int) with incorrect arguments should not produce output
-
- Resolved
-
-
JDK-8192467 Base64.Encoder.wrap(os).write(byte[],int,int) with incorrect arguments should not produce output
-
- Resolved
-