diff options
author | Nigel Tao <nigeltao@golang.org> | 2010-01-30 12:21:51 +1100 |
---|---|---|
committer | Nigel Tao <nigeltao@golang.org> | 2010-01-30 12:21:51 +1100 |
commit | fe8b427f2f40b5bdce54bf4c17aca70fb20ae33b (patch) | |
tree | fbf721088dcc8af6be550162a0b27be30899e9e0 /src/pkg/compress/gzip/gunzip.go | |
parent | d58b3781ec517269fb54ae2d6d3d32eabba8c91d (diff) | |
download | golang-fe8b427f2f40b5bdce54bf4c17aca70fb20ae33b.tar.gz |
Check gzip strings for NUL elements, since they are NUL-terminated
on the wire.
R=rsc
CC=golang-dev
http://codereview.appspot.com/194146
Diffstat (limited to 'src/pkg/compress/gzip/gunzip.go')
-rw-r--r-- | src/pkg/compress/gzip/gunzip.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pkg/compress/gzip/gunzip.go b/src/pkg/compress/gzip/gunzip.go index 6a1b9fac3..ea1d21034 100644 --- a/src/pkg/compress/gzip/gunzip.go +++ b/src/pkg/compress/gzip/gunzip.go @@ -104,7 +104,7 @@ func (z *Inflater) readString() (string, os.Error) { return "", err } if z.buf[i] == 0 { - // GZIP (RFC 1952) specifies that strings are null-terminated ISO 8859-1 (Latin-1). + // GZIP (RFC 1952) specifies that strings are NUL-terminated ISO 8859-1 (Latin-1). // TODO(nigeltao): Convert from ISO 8859-1 (Latin-1) to UTF-8. return string(z.buf[0:i]), nil } |