aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2010-01-26 14:42:49 +0100
committerAris Adamantiadis <aris@0xbadc0de.be>2010-01-26 14:42:49 +0100
commitce9be6dfca2f700674bf8e0fd585162e2ed07409 (patch)
tree613e098c4e9af106b73404f2af6d54868374d75f
parent5c3ea09e0262501959aa72ce3c863c4902e400f4 (diff)
downloadlibssh-v0-3.tar.gz
libssh-v0-3.tar.xz
libssh-v0-3.zip
Fix underflow when leave_function() are unbalancedv0-3
-rw-r--r--include/libssh/priv.h2
-rw-r--r--libssh/connect.c1
2 files changed, 1 insertions, 2 deletions
diff --git a/include/libssh/priv.h b/include/libssh/priv.h
index 01a6a858..91f983b2 100644
--- a/include/libssh/priv.h
+++ b/include/libssh/priv.h
@@ -238,7 +238,7 @@ typedef struct signature_struct {
struct error_struct {
/* error handling */
- int error_code;
+ unsigned int error_code;
char error_buffer[ERROR_BUFFERLEN];
};
diff --git a/libssh/connect.c b/libssh/connect.c
index f7843238..83622e9a 100644
--- a/libssh/connect.c
+++ b/libssh/connect.c
@@ -246,7 +246,6 @@ socket_t ssh_connect_host(SSH_SESSION *session, const char *host,
ssh_set_error(session, SSH_FATAL, "Connect failed: %s", strerror(errno));
close(s);
s = -1;
- leave_function();
continue;
} else {
/* We are connected */