mirror of https://github.com/cbeuw/Cloak
Fix overflow in padding length calculation
This commit is contained in:
parent
1e41aabe7d
commit
0473d71bea
|
|
@ -291,7 +291,7 @@ func (sesh *Session) passiveClose() error {
|
|||
func genRandomPadding() []byte {
|
||||
lenB := make([]byte, 1)
|
||||
common.CryptoRandRead(lenB)
|
||||
pad := make([]byte, lenB[0]+1)
|
||||
pad := make([]byte, int(lenB[0])+1)
|
||||
common.CryptoRandRead(pad)
|
||||
return pad
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue