mirror of
https://github.com/danog/tgseclib.git
synced 2024-11-27 04:34:45 +01:00
SSH2: limit the size of data that expect() looks at
This commit is contained in:
parent
cdda621903
commit
4dc79b96ed
@ -2670,7 +2670,7 @@ class Net_SSH2
|
||||
$match = $expect;
|
||||
while (true) {
|
||||
if ($mode == NET_SSH2_READ_REGEX) {
|
||||
preg_match($expect, $this->interactiveBuffer, $matches);
|
||||
preg_match($expect, substr($this->interactiveBuffer, -1024), $matches);
|
||||
$match = isset($matches[0]) ? $matches[0] : '';
|
||||
}
|
||||
$pos = strlen($match) ? strpos($this->interactiveBuffer, $match) : false;
|
||||
|
Loading…
Reference in New Issue
Block a user