You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
package main
import "compress/gzip"
func main() {
var gz gzip.Reader
gz.Close()
}
Expect: no output.
Get: panic: runtime error: invalid memory address or nil pointer dereference
Since the addition of Reset to gzip.Reader it is possible to use a gzip.Reader value that was not created by a call to gzip.NewReader, allowing lazy initialisation of the Reader. If the Reader has never been Reset the Close call attempts to close the underlying flate.decompressor, resulting in a nil pointer dereference.
The text was updated successfully, but these errors were encountered:
Using Go version 1.4.1
Run the program at http://play.golang.org/p/Sd2Vt1Nucr
Expect: no output.
Get: panic: runtime error: invalid memory address or nil pointer dereference
Since the addition of Reset to gzip.Reader it is possible to use a gzip.Reader value that was not created by a call to gzip.NewReader, allowing lazy initialisation of the Reader. If the Reader has never been Reset the Close call attempts to close the underlying flate.decompressor, resulting in a nil pointer dereference.
The text was updated successfully, but these errors were encountered: