]> Cypherpunks repositories - gostls13.git/commit
compress/gzip: fix Reader.Reset
authorJoe Tsai <joetsai@digital-static.net>
Sat, 2 Apr 2016 22:24:32 +0000 (15:24 -0700)
committerBrad Fitzpatrick <bradfitz@golang.org>
Sat, 2 Apr 2016 23:36:21 +0000 (23:36 +0000)
commit4ae4e81c2c14d4b36768d8d44b440c95f76411db
treed2df74ffb00660ceeaf11851ade5872f9e119071
parent27ebc84716f19e1c5b21e3a14de3204d19f28499
compress/gzip: fix Reader.Reset

Rather than specifying every field that should be cleared in Reset,
it is better to just zero the entire struct and only preserve or set the
fields that we actually care about. This ensures that the Header field
is reset for the next use.

Fixes #15077

Change-Id: I41832e506d2d64c62b700aa1986e7de24a577511
Reviewed-on: https://go-review.googlesource.com/21465
Run-TryBot: Joe Tsai <joetsai@digital-static.net>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/compress/gzip/gunzip.go
src/compress/gzip/gunzip_test.go