From c6ac672dbcfd63d2e6354aea83f3d343cb2cbbfd Mon Sep 17 00:00:00 2001 From: James Zern Date: Mon, 21 Nov 2022 11:02:45 -0800 Subject: [PATCH] webp-lossless-bitstream-spec: fix num_code_lengths check in the 'Normal Code Length Code' description the number of valid code lengths is 19, not 18. Bug: webp:448 Bug: webp:551 Change-Id: Id929604e1d771cb09b2d0ac617e83f21077f21de --- doc/webp-lossless-bitstream-spec.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/webp-lossless-bitstream-spec.txt b/doc/webp-lossless-bitstream-spec.txt index 89c9d012..0b011961 100644 --- a/doc/webp-lossless-bitstream-spec.txt +++ b/doc/webp-lossless-bitstream-spec.txt @@ -910,7 +910,7 @@ First, `num_code_lengths` specifies the number of code lengths. int num_code_lengths = 4 + ReadBits(4); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -If `num_code_lengths` is > 18, the bitstream is invalid. +If `num_code_lengths` is > 19, the bitstream is invalid. The code lengths are themselves encoded using prefix codes: lower level code lengths, `code_length_code_lengths`, first have to be read. The rest of those