mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-09 09:54:25 +09:00
kex1: Fix a possible null pointer dereference.
This commit is contained in:
@@ -47,6 +47,9 @@ static ssh_string make_rsa1_string(ssh_string e, ssh_string n){
|
|||||||
|
|
||||||
buffer = ssh_buffer_new();
|
buffer = ssh_buffer_new();
|
||||||
rsa = ssh_string_from_char("ssh-rsa1");
|
rsa = ssh_string_from_char("ssh-rsa1");
|
||||||
|
if (rsa == NULL) {
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
|
||||||
if (buffer_add_ssh_string(buffer, rsa) < 0) {
|
if (buffer_add_ssh_string(buffer, rsa) < 0) {
|
||||||
goto error;
|
goto error;
|
||||||
|
|||||||
Reference in New Issue
Block a user