mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-04 12:20:42 +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;
|
||||
int rc;
|
||||
|
||||
if (pubkey == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
key = ssh_key_new();
|
||||
if (key == NULL) {
|
||||
return NULL;
|
||||
|
||||
Reference in New Issue
Block a user