diff --git a/proto/reader.go b/proto/reader.go index 4aa8f48d..fd521262 100644 --- a/proto/reader.go +++ b/proto/reader.go @@ -87,8 +87,6 @@ func (r *Reader) UVarInt() (uint64, error) { return n, nil } -const maxStrSize = 10 * 1024 * 1024 // 10 MB - func (r *Reader) StrLen() (int, error) { n, err := r.Int() if err != nil { @@ -98,10 +96,6 @@ func (r *Reader) StrLen() (int, error) { if n < 0 { return 0, errors.Errorf("size %d is invalid", n) } - if n > maxStrSize { - // Protecting from possible OOM. - return 0, errors.Errorf("size %d too big (%d is maximum)", n, maxStrSize) - } return n, nil }