blob: 297d2cfb7e410bc53636c9b48db779da3437c571 [file] [log] [blame]
diff --git a/src/main/java/com/google/protobuf/ByteInputByteString.java b/src/main/java/com/google/protobuf/ByteInputByteString.java
index 320977290..2e5776eea 100644
--- a/src/main/java/com/google/protobuf/ByteInputByteString.java
+++ b/src/main/java/com/google/protobuf/ByteInputByteString.java
@@ -249,6 +249,8 @@ final class ByteInputByteString extends ByteString.LeafByteString {
public CodedInputStream newCodedInput() {
// We trust CodedInputStream not to modify the bytes, or to give anyone
// else access to them.
- return CodedInputStream.newInstance(buffer, offset, length, true);
+ CodedInputStream cis = CodedInputStream.newInstance(buffer, offset, length, true);
+ cis.enableAliasing(true);
+ return cis;
}
}