-
-
Save tamird/36639fb52e1962af093c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/crypto/tls/conn.go b/src/crypto/tls/conn.go | |
index 0377568..c989cd2 100644 | |
--- a/src/crypto/tls/conn.go | |
+++ b/src/crypto/tls/conn.go | |
@@ -774,6 +774,9 @@ func (c *Conn) writeRecord(typ recordType, data []byte) (n int, err error) { | |
data = data[m:] | |
} | |
c.out.freeBlock(b) | |
+ if err != nil { | |
+ return err | |
+ } | |
if typ == recordTypeChangeCipherSpec { | |
err = c.out.changeCipherSpec() | |
diff --git a/src/crypto/tls/handshake_client.go b/src/crypto/tls/handshake_client.go | |
index 3c996ac..970ba56 100644 | |
--- a/src/crypto/tls/handshake_client.go | |
+++ b/src/crypto/tls/handshake_client.go | |
@@ -144,7 +144,9 @@ NextCipherSuite: | |
} | |
} | |
- c.writeRecord(recordTypeHandshake, hello.marshal()) | |
+ if _, err := c.writeRecord(recordTypeHandshake, hello.marshal()); err != nil { | |
+ return err | |
+ } | |
msg, err := c.readHandshake() | |
if err != nil { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment