SSH2: fix for window sizes > 2,147,483,648

This commit is contained in:
terrafrost 2015-06-24 23:45:14 -05:00
parent 6789b945d0
commit c0555581e7
1 changed files with 4 additions and 0 deletions

View File

@ -3103,6 +3103,10 @@ class Net_SSH2
extract(unpack('Nserver_channel', $this->_string_shift($response, 4)));
$this->server_channels[$channel] = $server_channel;
extract(unpack('Nwindow_size', $this->_string_shift($response, 4)));
if ($window_size < 0) {
$window_size&= 0x7FFFFFFF;
$window_size+= 0x80000000;
}
$this->window_size_client_to_server[$channel] = $window_size;
$temp = unpack('Npacket_size_client_to_server', $this->_string_shift($response, 4));
$this->packet_size_client_to_server[$channel] = $temp['packet_size_client_to_server'];