]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Clarify that decoding too many Huffman weights is a failure condition 3813/head
authorelasota <1137273+elasota@users.noreply.github.com>
Thu, 9 Nov 2023 01:06:58 +0000 (20:06 -0500)
committerelasota <1137273+elasota@users.noreply.github.com>
Thu, 9 Nov 2023 01:06:58 +0000 (20:06 -0500)
doc/zstd_compression_format.md

index 0532a846f45ceacbb7cfe86b24b42e4aa465990c..b64ddc3bff272a8c16c36d72fa39083b51e7224e 100644 (file)
@@ -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.