diff options
author | Oliver Stöneberg <oliverst@online.de> | 2011-05-16 06:45:11 -0700 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2011-05-17 14:20:56 +0200 |
commit | 4e153aed8a943b636135b424e052fc69392ad87c (patch) | |
tree | 4c42faf8d1f8cc88b2f9d42be597f9d2379c1749 /src | |
parent | 525324b2f9ee2bd9a39ba88267e76c88e7f58bd1 (diff) | |
download | libssh-4e153aed8a943b636135b424e052fc69392ad87c.tar.gz libssh-4e153aed8a943b636135b424e052fc69392ad87c.tar.xz libssh-4e153aed8a943b636135b424e052fc69392ad87c.zip |
channel: Fixed potential use-after-free in ssh_channel_get_exit_status().
If ssh_channel_get_exit_status() is called more than once and the
connection closed.
Diffstat (limited to 'src')
-rw-r--r-- | src/channels.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/channels.c b/src/channels.c index d505661..b9ba051 100644 --- a/src/channels.c +++ b/src/channels.c @@ -2616,7 +2616,7 @@ int ssh_channel_get_exit_status(ssh_channel channel) { return -1; } - while (channel->remote_eof == 0 || channel->exit_status == -1) { + while ((channel->remote_eof == 0 || channel->exit_status == -1) && channel->session->alive) { /* Parse every incoming packet */ if (ssh_handle_packets(channel->session,-1) != SSH_OK) { return -1; |