go.crypto/ssh: allow zero sized window adjustments
The RFC doesn't prohibit zero sized window adjustments and there is evidence of well known clients using them in the wild. R=agl, kardianos, gustav.paul CC=golang-dev https://golang.org/cl/6209082
This commit is contained in:
+2
-1
@@ -300,8 +300,9 @@ type window struct {
|
||||
// add adds win to the amount of window available
|
||||
// for consumers.
|
||||
func (w *window) add(win uint32) bool {
|
||||
// a zero sized window adjust is a noop.
|
||||
if win == 0 {
|
||||
return false
|
||||
return true
|
||||
}
|
||||
w.L.Lock()
|
||||
if w.win+win < win {
|
||||
|
||||
Reference in New Issue
Block a user