]> Cypherpunks repositories - gostls13.git/commit
bufio: fix potential endless loop in ReadByte
authorRobert Griesemer <gri@golang.org>
Fri, 11 Apr 2014 04:46:00 +0000 (21:46 -0700)
committerRobert Griesemer <gri@golang.org>
Fri, 11 Apr 2014 04:46:00 +0000 (21:46 -0700)
commit7b6bc3ebb3a4088506d3d9c324d85aa49c035074
tree9902f81387ff73568bfe4a67be47813b08a21243
parent08d8eca9680d22e3229bac06b23852542340d6cf
bufio: fix potential endless loop in ReadByte

Also: Simplify ReadSlice implementation and
ensure that it doesn't call fill() with a full
buffer (this caused a failure in net/textproto
TestLargeReadMIMEHeader because fill() wasn't able
to read more data).

Fixes #7745.

LGTM=bradfitz
R=r, bradfitz
CC=golang-codereviews
https://golang.org/cl/86590043
src/pkg/bufio/bufio.go
src/pkg/bufio/bufio_test.go