mirror of
https://github.com/WiiLink24/wfc-server.git
synced 2026-08-13 04:15:35 -05:00
NAS: Fix out of bounds slice in TLS read
This commit is contained in:
@@ -424,7 +424,7 @@ func (c *consoleTLSConn) Read(b []byte) (n int, err error) {
|
||||
return 0, errors.New("non-application data received")
|
||||
}
|
||||
// Write the decrypted content to the buffer
|
||||
if int(recordLength-5-16) > len(b) {
|
||||
if int(recordLength-16) > len(b) {
|
||||
c.decodedBuffer.Write(buf[5+len(b) : 5+recordLength-16])
|
||||
}
|
||||
c.encodedBuffer.Next(5 + int(recordLength))
|
||||
|
||||
Reference in New Issue
Block a user