mirror of
https://github.com/facebook/zstd.git
synced 2024-12-03 05:36:44 +08:00
Merge pull request #3813 from elasota/overflow-clarification
Clarify that a stream containing too many Huffman weights is invalid
This commit is contained in:
commit
e19fe535f4
@ -1353,6 +1353,9 @@ If updating state after decoding a symbol would require more bits than
|
||||
remain in the stream, it is assumed that extra bits are 0. Then,
|
||||
symbols for each of the final states are decoded and the process is complete.
|
||||
|
||||
If this process would produce more weights than the maximum number of decoded
|
||||
weights (255), then the data is considered corrupted.
|
||||
|
||||
#### Conversion from weights to Huffman prefix codes
|
||||
|
||||
All present symbols shall now have a `Weight` value.
|
||||
|
Loading…
Reference in New Issue
Block a user