aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2015-08-18 09:09:31 +0200
committerAndreas Schneider <asn@cryptomilk.org>2015-08-18 09:09:31 +0200
commit36d9b62f1fa5493a54a1e776422b032f66bc0936 (patch)
tree3feb7bf5ce36ca0d57de72e775815e5e5df7a775
parentda4bebbe1e0384baec004641618bd981f50894ff (diff)
downloadlibssh-36d9b62f1fa5493a54a1e776422b032f66bc0936.tar.gz
libssh-36d9b62f1fa5493a54a1e776422b032f66bc0936.tar.xz
libssh-36d9b62f1fa5493a54a1e776422b032f66bc0936.zip
server: Fix return code check of ssh_buffer_pack()
Thanks to Andreas Gutschick <andreas.gutschick@mitel.com> Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
-rw-r--r--src/server.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server.c b/src/server.c
index 6a8a3fbe..a078e7af 100644
--- a/src/server.c
+++ b/src/server.c
@@ -746,7 +746,7 @@ int ssh_message_global_request_reply_success(ssh_message msg, uint16_t bound_por
if(msg->global_request.type == SSH_GLOBAL_REQUEST_TCPIP_FORWARD
&& msg->global_request.bind_port == 0) {
rc = ssh_buffer_pack(msg->session->out_buffer, "d", bound_port);
- if (rc != SSH_ERROR) {
+ if (rc != SSH_OK) {
ssh_set_error_oom(msg->session);
goto error;
}