diff options
author | Aris Adamantiadis <aris@0xbadc0de.be> | 2010-04-24 22:46:19 +0200 |
---|---|---|
committer | Aris Adamantiadis <aris@0xbadc0de.be> | 2010-04-24 22:46:19 +0200 |
commit | 6cdbc01208dad2113effda008be4f529b424a6d7 (patch) | |
tree | c8fec88adf742c1aad7d48ec194755eea403dcd8 /libssh/auth.c | |
parent | 833903e8ec23977ff8dde0be10717ccec0f85202 (diff) | |
download | libssh-6cdbc01208dad2113effda008be4f529b424a6d7.tar.gz libssh-6cdbc01208dad2113effda008be4f529b424a6d7.tar.xz libssh-6cdbc01208dad2113effda008be4f529b424a6d7.zip |
Fixes infinite loops
Thanks to Xi Wang for the patches
Diffstat (limited to 'libssh/auth.c')
-rw-r--r-- | libssh/auth.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libssh/auth.c b/libssh/auth.c index b0e0e905..3961f788 100644 --- a/libssh/auth.c +++ b/libssh/auth.c @@ -218,7 +218,8 @@ static int wait_auth_status(ssh_session session) { enter_function(); while (session->auth_state == SSH_AUTH_STATE_NONE) { - ssh_handle_packets(session,-1); + if (ssh_handle_packets(session,-1) != SSH_OK) + break; } switch(session->auth_state){ case SSH_AUTH_STATE_ERROR: |