1
0
mirror of https://github.com/golang/go synced 2024-11-23 15:30:05 -07:00

net: accept 64 kB lines in /etc/hosts

Apparently 4 kB is not enough for some people.

Fixes #21674.

Change-Id: If39eeb225d548b578560939f6ce51e31060f5aff
Reviewed-on: https://go-review.googlesource.com/79516
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
Russ Cox 2017-11-22 15:36:54 -05:00 committed by Brad Fitzpatrick
parent 5b649ffa23
commit 13f45d09fa

View File

@ -69,7 +69,7 @@ func open(name string) (*file, error) {
if err != nil {
return nil, err
}
return &file{fd, make([]byte, 0, os.Getpagesize()), false}, nil
return &file{fd, make([]byte, 0, 64*1024), false}, nil
}
func stat(name string) (mtime time.Time, size int64, err error) {