Segfault when reading from ssh2_exec output stream with 1.0-1~dotdeb+8.3
Closed this issue · 2 comments
Thank you for releasing 1.0-1~dotdeb+8.3 with the patch for issue #1! Unfortunately, the new version gives me a consistently reproducible segfault when trying to read the output stream from ssh2_exec
. My reproduction script:
<?php
$ssh = ssh2_connect('myhost', 22) or exit("Cannot connect");
ssh2_auth_password($ssh, 'myuser', 'mypass') or exit("Cannot authenticate");
$exec_stream = ssh2_exec($ssh, 'hostname');
stream_set_blocking($exec_stream, 1);
print stream_get_contents($exec_stream);
Here myhost
, myuser
and mypass
are a valid combination of hostname and credentials.
On 1.0-1~dotdeb+8.3
the script exits with a segfault (whether run over the CLI or using mod_php
for Apache); if I revert to 1.0-1~dotdeb+8.2
it works correctly and prints the hostname of the target host.
I run the amd64 version with PHP 7.0.13-1~dotdeb+8.1
on Debian 8.
I just published new packages with a lighter fix for #1 . Please let me know if they fix your issue too.
The new packages work for us; thank you!