]> Cypherpunks repositories - gostls13.git/commit
compress/flate: fix deflate Reset consistency
authorKlaus Post <klauspost@gmail.com>
Thu, 7 May 2020 12:50:00 +0000 (12:50 +0000)
committerRuss Cox <rsc@golang.org>
Thu, 16 Jul 2020 20:54:37 +0000 (20:54 +0000)
commit8d4330742c1866faa8b1ef575877e5afb8a4355c
treea929d20e25d4732168e53487d51cc45ad734d17d
parentc5d7f2f1cbaca8938a31a022058b1a3300817e33
compress/flate: fix deflate Reset consistency

Modify the overflow detection logic to shuffle the contents
of the table to a lower offset to avoid leaking the effects
of a previous use of compress.Writer past Reset calls.

Fixes #34121

Change-Id: I9963eadfa5482881e7b7adbad4c2cae146b669ab
GitHub-Last-Rev: 8b35798cdd4d5a901d6422647b12984d7e500ba3
GitHub-Pull-Request: golang/go#34128
Reviewed-on: https://go-review.googlesource.com/c/go/+/193605
Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
Run-TryBot: Joe Tsai <thebrokentoaster@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/compress/flate/deflatefast.go
src/compress/flate/writer_test.go