mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-11-29 01:03:57 +03:00
messages: Check return value of ssh_buffer_unpack().
CID: 1230356 Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Aris Adamantiadis <aris@0xbadc0de.be>
This commit is contained in:
@@ -860,6 +860,7 @@ SSH_PACKET_CALLBACK(ssh_packet_userauth_info_response){
|
|||||||
uint32_t nanswers;
|
uint32_t nanswers;
|
||||||
uint32_t i;
|
uint32_t i;
|
||||||
ssh_string tmp;
|
ssh_string tmp;
|
||||||
|
int rc;
|
||||||
|
|
||||||
ssh_message msg = NULL;
|
ssh_message msg = NULL;
|
||||||
|
|
||||||
@@ -887,7 +888,11 @@ SSH_PACKET_CALLBACK(ssh_packet_userauth_info_response){
|
|||||||
msg->auth_request.username = NULL;
|
msg->auth_request.username = NULL;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ssh_buffer_unpack(packet, "d", &nanswers);
|
rc = ssh_buffer_unpack(packet, "d", &nanswers);
|
||||||
|
if (rc != SSH_OK) {
|
||||||
|
ssh_set_error_invalid(session);
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
|
||||||
if (session->kbdint == NULL) {
|
if (session->kbdint == NULL) {
|
||||||
SSH_LOG(SSH_LOG_PROTOCOL, "Warning: Got a keyboard-interactive "
|
SSH_LOG(SSH_LOG_PROTOCOL, "Warning: Got a keyboard-interactive "
|
||||||
|
|||||||
Reference in New Issue
Block a user