mirror of
https://github.com/libssh2/libssh2.git
synced 2025-11-20 02:42:09 +03:00
We should check whether *key_method is a NULL pointer instead of key_method
Signed-off-by: renmingshuai <renmingshuai@huawei.com>
This commit is contained in:
committed by
Viktor Szakats
parent
724effcb47
commit
bec57c409d
@@ -1410,7 +1410,7 @@ _libssh2_key_sign_algorithm(LIBSSH2_SESSION *session,
|
||||
LIBSSH2_FREE(session, *key_method);
|
||||
|
||||
*key_method = LIBSSH2_ALLOC(session, match_len);
|
||||
if(key_method) {
|
||||
if(*key_method) {
|
||||
memcpy(*key_method, match, match_len);
|
||||
*key_method_len = match_len;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user