leitzler commented on code in PR #3057: URL: https://github.com/apache/thrift/pull/3057#discussion_r1819495865
########## lib/go/thrift/binary_protocol.go: ########## @@ -555,7 +555,28 @@ func safeReadBytes(size int32, trans io.Reader) ([]byte, error) { return nil, nil } - buf := new(bytes.Buffer) - _, err := io.CopyN(buf, trans, int64(size)) - return buf.Bytes(), err + const readLimit = 10 * 1024 * 1024 Review Comment: 👍 I'll update the PR later today, thanks! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@thrift.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org