mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-12 03:00:26 +09:00
legacy: Fix possible null pointer dereference
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
@@ -545,6 +545,10 @@ ssh_string publickey_to_string(ssh_public_key pubkey) {
|
|||||||
ssh_string key_blob;
|
ssh_string key_blob;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
|
if (pubkey == NULL) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
key = ssh_key_new();
|
key = ssh_key_new();
|
||||||
if (key == NULL) {
|
if (key == NULL) {
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|||||||
Reference in New Issue
Block a user