mirror of https://github.com/cbeuw/Cloak
Prevent recvBufferSizeLimit from overflowing signed 32-bit integer
This commit is contained in:
parent
f27889af11
commit
32494b8d86
|
|
@ -25,4 +25,4 @@ type recvBuffer interface {
|
||||||
// size we want the amount of unread data in buffer to grow before recvBuffer.Write blocks.
|
// size we want the amount of unread data in buffer to grow before recvBuffer.Write blocks.
|
||||||
// If the buffer grows larger than what the system's memory can offer at the time of recvBuffer.Write,
|
// If the buffer grows larger than what the system's memory can offer at the time of recvBuffer.Write,
|
||||||
// a panic will happen.
|
// a panic will happen.
|
||||||
const recvBufferSizeLimit = 1 << 31
|
const recvBufferSizeLimit = 1<<31 - 1
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue