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
This is an issue with chipz. decode-value ensures as many bits as are needed for the longest code, which can read bits past the end of the input if the code for the end-of-block marker isn't at least as long as all other codes. An encoder will usually not produce such a tree since EOB is by definition the least frequently used symbol - except when the last block uses the fixed Huffman code. Of course, a stupid/malicious encoder could also trigger this in a dynamic block.
Since this issue only affects the rare raw Deflate (zlib & gzip have trailing checksums that end up protecting against this) and repeatedly calling ensure-bits in the hottest part of the code is probably a bad idea, it might be worth it to write a separate version of decode-value for raw Deflate.
Following has a reasonable chance (30%+) of triggering
EOF
error fromchipz
:Not completely sure it is
chipz
rather thansalza2
, but other decompressors don't seem to object to the same data.The text was updated successfully, but these errors were encountered: