Is this empty input block legal?

25 views
Skip to first unread message

compdecomp7

unread,
Dec 14, 2021, 2:34:14 AM12/14/21
to LZ4c
I stumbled upon this block while trying to do some fuzzing. Following is the hexdump of the file and greyed portion is the only block. As you can see it's a compressed block of size 1 byte with with no literal and 8 byte of match length. The Version 1.9.3 decompresses this file to an empty file of 0 byte without any error.

00000000: 0422 4D18 6440 A701 0000 0004 0000 0000  ."M.d@..........
00000010: 055D CC02                                .]..

But according to the spec "Empty input can be represented with a zero byte, interpreted as a final token without literal and without a match."

I am not sure how to explain the block I mentioned. There's no preceding block , so how the decompressor is interpreting the 9 bytes of match length without raising an error. I was expecting a Error 68 : Unfinished stream
Reply all
Reply to author
Forward
0 new messages