mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-12-14 04:18:54 +03:00
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>
This commit is contained in:
@@ -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
|
if(msg->global_request.type == SSH_GLOBAL_REQUEST_TCPIP_FORWARD
|
||||||
&& msg->global_request.bind_port == 0) {
|
&& msg->global_request.bind_port == 0) {
|
||||||
rc = ssh_buffer_pack(msg->session->out_buffer, "d", bound_port);
|
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);
|
ssh_set_error_oom(msg->session);
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user