ssh: return correct error on read failure
Change-Id: I6cc94ae8dbc65f394550551eaad88594d22eda42 Reviewed-on: https://go-review.googlesource.com/89095 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Han-Wen Nienhuys <hanwen@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
+1
-1
@@ -693,7 +693,7 @@ func (c *chacha20Poly1305Cipher) readPacket(seqNum uint32, r io.Reader) ([]byte,
|
||||
}
|
||||
|
||||
if _, err := io.ReadFull(r, c.buf[4:packetEnd]); err != nil {
|
||||
return nil, errors.New("ssh: MAC failure")
|
||||
return nil, err
|
||||
}
|
||||
|
||||
var mac [poly1305.TagSize]byte
|
||||
|
||||
Reference in New Issue
Block a user