Skip to content

Commit

Permalink
Fix overflow in padding length calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeuw committed Dec 19, 2020
1 parent 1e41aab commit 0473d71
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/multiplex/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 0473d71

Please sign in to comment.