Add vanilla parity harness and harden server boundaries

This commit is contained in:
Daniar Mannanov 2026-08-10 22:52:44 +03:00
parent 1924cb5591
commit ca019756ec
25 changed files with 1118 additions and 217 deletions

View file

@ -64,8 +64,13 @@ var (
ErrVarIntTooBig = errors.New("protocol: varint is too big")
// ErrStringTooLong is returned when a string exceeds MaxStringLen.
ErrStringTooLong = errors.New("protocol: string too long")
// ErrInvalidString is returned for protocol strings that are not UTF-8.
ErrInvalidString = errors.New("protocol: invalid UTF-8 string")
// ErrPacketTooLarge is returned when a packet length exceeds MaxPacketSize.
ErrPacketTooLarge = errors.New("protocol: packet too large")
// ErrBadCompression is returned when a frame violates the negotiated
// compression threshold or its stream does not match the declared length.
ErrBadCompression = errors.New("protocol: invalid compressed packet")
)
// ReadVarInt reads a 32-bit VarInt from r, returning the value and the number