Added note about invalid distance values

This commit is contained in:
Ende 2015-10-26 16:00:20 -04:00
parent 10522411f1
commit a05fa62501
2 changed files with 9 additions and 6 deletions

View File

@ -865,6 +865,9 @@ Given a distance symbol "dcode" (>= 16 + NDIRECT), and extra bits
distance = ((offset + dextra) << NPOSTFIX) + lcode + NDIRECT + 1
.fi
If a decoded distance has a zero or negative value, the stream should
be rejected as invalid.
.ti 0
5. Encoding of literal insertion lengths and copy lengths

View File

@ -77,7 +77,7 @@ Table of Contents
3.4. Simple prefix codes . . . . . . . . . . . . . . . . . . . 12
3.5. Complex prefix codes . . . . . . . . . . . . . . . . . . 13
4. Encoding of distances . . . . . . . . . . . . . . . . . . . . 16
5. Encoding of literal insertion lengths and copy lengths . . . . 17
5. Encoding of literal insertion lengths and copy lengths . . . . 18
6. Encoding of block switch commands . . . . . . . . . . . . . . 20
7. Context modeling . . . . . . . . . . . . . . . . . . . . . . . 21
7.1. Context modes and context ID lookup for literals . . . . 21
@ -947,7 +947,7 @@ Internet-Draft Brotli October 2015
offset = ((2 + (hcode & 1)) << ndistbits) - 4;
distance = ((offset + dextra) << NPOSTFIX) + lcode + NDIRECT + 1
5. Encoding of literal insertion lengths and copy lengths
If a decoded distance has a zero or negative value, the stream should
@ -956,6 +956,10 @@ Alakuijala & Szabadka Expires April 6, 2016 [Page 17]
Internet-Draft Brotli October 2015
be rejected as invalid.
5. Encoding of literal insertion lengths and copy lengths
As described in Section 2, the literal insertion lengths and backward
copy lengths are encoded using a single prefix code. This section
provides the details to this encoding.
@ -1003,10 +1007,6 @@ Internet-Draft Brotli October 2015
Alakuijala & Szabadka Expires April 6, 2016 [Page 18]
Internet-Draft Brotli October 2015