mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-11 02:38:09 +09:00
Add error checking to ssh_message_auth_reply_success().
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@444 7dcaeef0-15fb-0310-b436-a5af3365683c
This commit is contained in:
@@ -299,9 +299,18 @@ error:
|
|||||||
}
|
}
|
||||||
|
|
||||||
int ssh_message_auth_reply_success(SSH_MESSAGE *msg, int partial) {
|
int ssh_message_auth_reply_success(SSH_MESSAGE *msg, int partial) {
|
||||||
if(partial)
|
if (msg == NULL) {
|
||||||
|
return SSH_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (partial) {
|
||||||
return ssh_message_auth_reply_default(msg, partial);
|
return ssh_message_auth_reply_default(msg, partial);
|
||||||
buffer_add_u8(msg->session->out_buffer,SSH2_MSG_USERAUTH_SUCCESS);
|
}
|
||||||
|
|
||||||
|
if (buffer_add_u8(msg->session->out_buffer,SSH2_MSG_USERAUTH_SUCCESS) < 0) {
|
||||||
|
return SSH_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
return packet_send(msg->session);
|
return packet_send(msg->session);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user