This commit is contained in:
nadoo committed 2018-11-21 20:28:46 +08:00
1 parent 266578d67d
commit 2813e80a98
4 files changed
+17 -17

No files matched your search

+4 -1
View File
@@ -207,10 +207,13 @@ func (c *Conn) DecodeRespHeader() error {
}
stream := cipher.NewCFBDecrypter(block, c.respBodyIV[:])
buf := make([]byte, 4)
if _, err := io.ReadFull(c.Conn, buf); err != nil {
_, err = io.ReadFull(c.Conn, buf)
if err != nil {
return err
}
stream.XORKeyStream(buf, buf)
if buf[0] != c.reqRespV {