A+C: Ehren Kret (individual CLA)

Generated by addca.

R=gobot
CC=golang-dev
https://codereview.appspot.com/13234049
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 issue 6255.

R=golang-dev, rsc
CC=golang-dev
https://codereview.appspot.com/13230043

Committer: Brad Fitzpatrick <bradfitz@golang.org>