Moved not about invalid distances up to 0-15 section

This commit is contained in:
Ende 2015-10-27 06:35:30 -04:00
parent a05fa62501
commit d1cd34f6d9
2 changed files with 7 additions and 7 deletions

View File

@ -842,6 +842,9 @@ distance that was not represented by a 0 distance symbol. Similarly,
distances that represent static dictionary words (see Section 8.) are
not pushed to the ring buffer of last distances.
If a special distance symbol resolves to a zero or negative value, the
stream should be rejected as invalid.
The next NDIRECT distance symbols, from 16 to 15 + NDIRECT, represent
distances from 1 to NDIRECT. Neither the distance special symbols, nor
the NDIRECT direct distance symbols are followed by any extra bits.
@ -865,9 +868,6 @@ 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

@ -925,6 +925,9 @@ Internet-Draft Brotli October 2015
symbol. Similarly, distances that represent static dictionary words
(see Section 8.) are not pushed to the ring buffer of last distances.
If a special distance symbol resolves to a zero or negative value,
the stream should be rejected as invalid.
The next NDIRECT distance symbols, from 16 to 15 + NDIRECT, represent
distances from 1 to NDIRECT. Neither the distance special symbols,
nor the NDIRECT direct distance symbols are followed by any extra
@ -945,9 +948,6 @@ Internet-Draft Brotli October 2015
hcode = (dcode - NDIRECT - 16) >> NPOSTFIX
lcode = (dcode - NDIRECT - 16) & POSTFIX_MASK
offset = ((2 + (hcode & 1)) << ndistbits) - 4;
distance = ((offset + dextra) << NPOSTFIX) + lcode + NDIRECT + 1
If a decoded distance has a zero or negative value, the stream should
@ -956,7 +956,7 @@ Alakuijala & Szabadka Expires April 6, 2016 [Page 17]
Internet-Draft Brotli October 2015
be rejected as invalid.
distance = ((offset + dextra) << NPOSTFIX) + lcode + NDIRECT + 1
5. Encoding of literal insertion lengths and copy lengths