aboutsummaryrefslogtreecommitdiff
path: root/src/encoding
diff options
context:
space:
mode:
authorJoe Tsai <joetsai@digital-static.net>2016-04-02 16:47:51 -0700
committerIan Lance Taylor <iant@golang.org>2016-04-14 23:45:51 +0000
commitd0e8d3a7ae2194b1753bc4e419d5f00aa2d5cb86 (patch)
treeee5fc57cefc9a3e44cd7cb84229842921f74c036 /src/encoding
parentd093a6269160cf94b7add76dc3e60e94d8afc44e (diff)
downloadgo-d0e8d3a7ae2194b1753bc4e419d5f00aa2d5cb86.tar.xz
compress/gzip: fix Reader to properly check FHCRC
RFC 1952, section 3.2.3 says: >>> If FHCRC is set, a CRC16 for the gzip header is present, immediately before the compressed data. The CRC16 consists of the two least significant bytes of the CRC32 for all bytes of the gzip header up to and not including the CRC16. <<< Thus, instead of computing the CRC only over the first 10 bytes of the header, we compute it over the whole header (minus CRC16). Fixes #15070 Change-Id: I55703fd30b535b12abeb5e3962d4da0a86ed615a Reviewed-on: https://go-review.googlesource.com/21466 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/encoding')
0 files changed, 0 insertions, 0 deletions