mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-05-16 08:04:30 +03:00
Fix free() on uninitialized data on some cases.
This commit is contained in:
parent
14d6b8856f
commit
47d11734e1
@ -256,6 +256,7 @@ SSH_PACKET_CALLBACK(ssh_packet_kexinit){
|
||||
enter_function();
|
||||
(void)type;
|
||||
(void)user;
|
||||
memset(strings, 0, sizeof(strings));
|
||||
if(session->session_state != SSH_SESSION_STATE_INITIAL_KEX){
|
||||
ssh_set_error(session,SSH_FATAL,"SSH_KEXINIT received in wrong state");
|
||||
goto error;
|
||||
@ -282,8 +283,6 @@ SSH_PACKET_CALLBACK(ssh_packet_kexinit){
|
||||
}
|
||||
}
|
||||
|
||||
memset(strings, 0, sizeof(char *) * 10);
|
||||
|
||||
for (i = 0; i < 10; i++) {
|
||||
str = buffer_get_ssh_string(packet);
|
||||
if (str == NULL) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user