diff options
author | Mark Riordan <mriordan@ipswitch.com> | 2011-04-08 09:50:32 -0500 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2011-04-14 14:19:15 +0200 |
commit | ced66eb11f48107a3354a39345c73422a4b33582 (patch) | |
tree | d797a5a19e7e0ab0bb8041872fe76816d7ee99ea | |
parent | 1b44daddf6a7365e6c9a14b215032dc561a9f6bd (diff) | |
download | libssh-ced66eb11f48107a3354a39345c73422a4b33582.tar.gz libssh-ced66eb11f48107a3354a39345c73422a4b33582.tar.xz libssh-ced66eb11f48107a3354a39345c73422a4b33582.zip |
scp: Fix potential infinite loop in ssh_scp_close
Signed-off-by: Mark Riordan <mriordan@ipswitch.com>
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
(cherry picked from commit 5939cfe78af88710fb88f93ee435b78b93022f4e)
-rw-r--r-- | src/scp.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -148,7 +148,7 @@ int ssh_scp_close(ssh_scp scp){ */ while(!ssh_channel_is_eof(scp->channel)){ err=ssh_channel_read(scp->channel,buffer,sizeof(buffer),0); - if(err==SSH_ERROR) + if(err==SSH_ERROR || err==0) break; } if(ssh_channel_close(scp->channel) == SSH_ERROR){ |