eclipse-ee4j / eclipse-ee4j/orb
Input stream mark and reset do not preserve endianness
- Dominant language
- Java
- Stars
- 30
- Forks
- 28
- Avg merge
- 3h 43m
- Merged PRs (30d)
- 9
Description
When an input stream is marked, the underlying `byteBuffer` is duplicated using the `java.nio.ByteBuffer.duplicate()` function which does not replicate the buffer byte order.
https://github.com/eclipse-ee4j/orb/blob/8626fd5def9c7452a57aecf69e146c43c14ed039/orbmain/src/main/java/com/sun/corba/ee/impl/encoding/CDRInputStream_1_0.java#L1922
This breaks the processing of little endian user exception replies which peeks at the exception id and resets the input stream with the wrong byte order.
https://github.com/eclipse-ee4j/orb/blob/8626fd5def9c7452a57aecf69e146c43c14ed039/orbmain/src/main/java/com/sun/corba/ee/impl/protocol/ClientRequestDispatcherImpl.java#L549
Contributor guide
Assessment
This issue has not been assessed yet.