mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 18:53:35 +00:00
rebase: bump google.golang.org/grpc from 1.71.0 to 1.71.1
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.71.0 to 1.71.1. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](https://github.com/grpc/grpc-go/compare/v1.71.0...v1.71.1) --- updated-dependencies: - dependency-name: google.golang.org/grpc dependency-version: 1.71.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
committed by
mergify[bot]
parent
0f572b62d1
commit
f4cea29ca6
16
vendor/google.golang.org/grpc/rpc_util.go
generated
vendored
16
vendor/google.golang.org/grpc/rpc_util.go
generated
vendored
@ -870,13 +870,19 @@ func decompress(compressor encoding.Compressor, d mem.BufferSlice, dc Decompress
|
||||
return nil, status.Errorf(codes.Internal, "grpc: failed to decompress the message: %v", err)
|
||||
}
|
||||
|
||||
out, err := mem.ReadAll(io.LimitReader(dcReader, int64(maxReceiveMessageSize)), pool)
|
||||
// Read at most one byte more than the limit from the decompressor.
|
||||
// Unless the limit is MaxInt64, in which case, that's impossible, so
|
||||
// apply no limit.
|
||||
if limit := int64(maxReceiveMessageSize); limit < math.MaxInt64 {
|
||||
dcReader = io.LimitReader(dcReader, limit+1)
|
||||
}
|
||||
out, err := mem.ReadAll(dcReader, pool)
|
||||
if err != nil {
|
||||
out.Free()
|
||||
return nil, status.Errorf(codes.Internal, "grpc: failed to read decompressed data: %v", err)
|
||||
}
|
||||
|
||||
if out.Len() == maxReceiveMessageSize && !atEOF(dcReader) {
|
||||
if out.Len() > maxReceiveMessageSize {
|
||||
out.Free()
|
||||
return nil, status.Errorf(codes.ResourceExhausted, "grpc: received message after decompression larger than max %d", maxReceiveMessageSize)
|
||||
}
|
||||
@ -885,12 +891,6 @@ func decompress(compressor encoding.Compressor, d mem.BufferSlice, dc Decompress
|
||||
return nil, status.Errorf(codes.Internal, "grpc: no decompressor available for compressed payload")
|
||||
}
|
||||
|
||||
// atEOF reads data from r and returns true if zero bytes could be read and r.Read returns EOF.
|
||||
func atEOF(dcReader io.Reader) bool {
|
||||
n, err := dcReader.Read(make([]byte, 1))
|
||||
return n == 0 && err == io.EOF
|
||||
}
|
||||
|
||||
type recvCompressor interface {
|
||||
RecvCompress() string
|
||||
}
|
||||
|
Reference in New Issue
Block a user