1
0
mirror of https://github.com/golang/go synced 2024-09-29 14:24:32 -06:00
go/src
Ehren Kret 3b6b53f493 compress/flate: prevent panic when reinitializing huffmanDecoder with bad input
The huffmanDecoder struct appears to be intented for reuse by calling init a
second time with a second sequence of code lengths. Unfortunately, it can
currently panic if the second sequence of code lengths has a minimum value
greater than 10 due to failure to reinitialize the links table.

This change prevents the panic by resetting the huffmanDecoder struct back to
the struct's zero value at the beginning of the init method if the
huffmanDecoder is being reused (determined by checking if min has been set to a
non-zero value).

Fixes #6255.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/13230043
2013-09-06 15:09:42 -07:00
..
cmd cmd/go: rename go.exe if cannot delete it during clean 2013-09-06 16:55:35 -04:00
lib9 all: compiler/bootstrap for dragonfly/amd64 2013-08-24 01:18:04 +10:00
libbio libbio, all cmd: consistently use BGETC/BPUTC instead of Bgetc/Bputc 2013-08-30 15:46:12 +04:00
libmach libbio, all cmd: consistently use BGETC/BPUTC instead of Bgetc/Bputc 2013-08-30 15:46:12 +04:00
pkg compress/flate: prevent panic when reinitializing huffmanDecoder with bad input 2013-09-06 15:09:42 -07:00
all.bash
all.bat
all.rc
clean.bash
clean.bat
clean.rc
make.bash make.bash: exit if dist fails 2013-08-19 11:18:43 +10:00
make.bat
Make.dist
make.rc
race.bash
race.bat
run.bash cgo: enable cgo on dragonfly 2013-09-04 15:19:21 -07:00
run.bat runtime/race: add end-to-end test on windows 2013-08-15 12:13:00 +10:00
run.rc
sudo.bash