Don't fail on partial read.
May fix #38849.
Change-Id: Icf075d454e1bfe9299b07eea47bbc4d448c3bd5e
Reviewed-on: https://go-review.googlesource.com/c/go/+/232317
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
"cmd/internal/src"
"encoding/binary"
"fmt"
+ "io"
"math/big"
"os"
"strings"
}
// Fingerprint
- n, err := in.Read(fingerprint[:])
+ n, err := io.ReadFull(in, fingerprint[:])
if err != nil || n != len(fingerprint) {
yyerror("import %s: error reading fingerprint", pkg.Path)
errorexit()