Skip to content

Commit

Permalink
Merge pull request #321 from ClickHouse/fix/remove-str-length-limit
Browse files Browse the repository at this point in the history
fix(proto.reader): remove str length limit
  • Loading branch information
ernado authored Aug 17, 2023
2 parents 0893931 + e856ce1 commit e91dfd6
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions proto/reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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
}
Expand Down

0 comments on commit e91dfd6

Please sign in to comment.