mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
net: make parseProcNetIGMP more robust
Suggested by Paul Borman. Fixes #2826. R=rsc, borman CC=golang-dev https://golang.org/cl/5689048
This commit is contained in:
parent
880cda557a
commit
9765325d49
6 changed files with 119 additions and 17 deletions
|
|
@ -67,7 +67,7 @@ func open(name string) (*file, error) {
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &file{fd, make([]byte, 1024)[0:0], false}, nil
|
||||
return &file{fd, make([]byte, os.Getpagesize())[0:0], false}, nil
|
||||
}
|
||||
|
||||
func byteIndex(s string, c byte) int {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue