You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This causes incorrect dictionary parsing or exceptions when the metadata ByteBuffer has a non-zero position (e.g., when it is a slice of a larger buffer).
The sibling method getMetadataKey does not have this bug because dataPos is
computed as an absolute position.
appendBinary mutates caller's ByteBuffer
VariantBuilder.appendBinary(ByteBuffer) calls .put(binary) which advances the
caller's ByteBuffer position. The analogous method appendEncodedValue uses value.duplicate().get(...) to avoid this side effect.
Describe the bug, including details regarding any error messages, version, and platform.
Description:
getMetadataMapincorrect positionIn
VariantUtil.getMetadataMap, the else-branch (read-only or non-array-backedByteBuffer) computes the slice position incorrectly:stringStartis relative topos(metadata.position()), but the array-backedbranch correctly adds
pos:This causes incorrect dictionary parsing or exceptions when the metadata
ByteBufferhas a non-zero position (e.g., when it is a slice of a larger buffer).The sibling method
getMetadataKeydoes not have this bug becausedataPosiscomputed as an absolute position.
appendBinarymutates caller'sByteBufferVariantBuilder.appendBinary(ByteBuffer)calls.put(binary)which advances thecaller's
ByteBufferposition. The analogous methodappendEncodedValueusesvalue.duplicate().get(...)to avoid this side effect.Component(s)
Core