You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix decompression of empty messages with a ratio limit (#2246)
Motivation:
The decompressor has a decompression limit to protect against zip bombs.
This can either be absolute or ratio based. It's also possible in gRPC
for a zero length message to be marked as compressed. gRPC attempts to
decompress the zero length message and fails (because zlib wants a
non-zero sized buffer and gRPC won't give it one as the limit is the
buffer size is limited by the `ratio * msg_size` which in this case is
zero).
Modifications:
- If the input to decompress has no length, skip decompression
altogether
Result:
- Can decompress zero length payloads with the ratio limit
- Resolves#2245
0 commit comments