1
0
mirror of https://github.com/danog/tgseclib.git synced 2024-12-04 18:48:37 +01:00

Merge branch '2.0'

* 2.0:
  SSH2: limit the size of data that expect() looks at
This commit is contained in:
Andreas Fischer 2015-07-17 11:18:05 +02:00
commit d113e086b5

View File

@ -2587,7 +2587,7 @@ class SSH2
$match = $expect;
while (true) {
if ($mode == self::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;