]> Cypherpunks repositories - gostls13.git/commit
fmt, encoding/gob: fix misuse of Read
authorShenghou Ma <minux.ma@gmail.com>
Mon, 17 Dec 2012 17:26:48 +0000 (01:26 +0800)
committerShenghou Ma <minux.ma@gmail.com>
Mon, 17 Dec 2012 17:26:48 +0000 (01:26 +0800)
commit5a2c275be125d935440ddad3042bfc7bb2ce5027
tree613d9b9d2a24637fb0a3407808379d57d1007e4d
parent2ad67147936bb1bf1f95d2a2ae41deab236712e9
fmt, encoding/gob: fix misuse of Read
reader.Read() can return both 0,nil and len(buf),err.
To be safe, we use io.ReadFull instead of doing reader.Read directly.

Fixes #3472.

R=bradfitz, rsc, ality
CC=golang-dev
https://golang.org/cl/6285050
src/pkg/encoding/gob/decode.go
src/pkg/fmt/scan.go