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
Reader.int64() accepts an invalid terminating tenth byte whose payload exceeds the one remaining bit of a 64-bit protobuf varint. Nine 0x80 bytes followed by 0x7f is 70 bits wide, but the decoder passes it through BigInt.asIntN(64, ...) and silently truncates it.
Reproduction
Decode a message containing an int64 field encoded as 08 80 80 80 80 80 80 80 80 80 7f. It currently succeeds instead of rejecting the malformed varint.
Expected
The decoder should reject a terminating tenth byte with payload greater than 0x01, while continuing to accept valid 64-bit boundary values.
Scope
This is distinct from #748: it covers the 64-bit decoder and its ten-byte bound, rather than uint32's five-byte bound.
Activity
outlier27-cell commentedon Oct 11, 2026
我来认领这个问题:将补充非法第十字节的回归用例,并在 Reader.int64 中拒绝超过 64 位的终止 varint。