iemejia commented on code in PR #3853:
URL: https://github.com/apache/avro/pull/3853#discussion_r3567574843
##########
lang/c/src/codec.c:
##########
@@ -483,11 +609,41 @@ static int decode_lzma(avro_codec_t codec, void * data,
int64_t len)
codec->used_size = write_pos;
- // If it ran out of space to decode, give it more!!
- // It will continue where it left off because of read_pos and
write_pos.
+ // Reject a block that decompresses to more than the allowed
maximum,
+ // to guard against unbounded allocation from a high-ratio
block.
Review Comment:
Fixed — decode_lzma now rejects a compressed `len` that is negative or >
SIZE_MAX before passing it to lzma_raw_buffer_decode's size_t input-size
parameter.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]