mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-11 18:50:28 +09:00
pki_crypto: Cast return value of EVP_PKEY_size() to size_t
Fixes T188
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
(cherry picked from commit 3cca9994d4)
This commit is contained in:
@@ -2117,7 +2117,7 @@ ssh_signature pki_sign_data(const ssh_key privkey,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Allocate buffer for signature */
|
/* Allocate buffer for signature */
|
||||||
raw_sig_len = EVP_PKEY_size(pkey);
|
raw_sig_len = (size_t)EVP_PKEY_size(pkey);
|
||||||
raw_sig_data = (unsigned char *)malloc(raw_sig_len);
|
raw_sig_data = (unsigned char *)malloc(raw_sig_len);
|
||||||
if (raw_sig_data == NULL) {
|
if (raw_sig_data == NULL) {
|
||||||
SSH_LOG(SSH_LOG_TRACE, "Out of memory");
|
SSH_LOG(SSH_LOG_TRACE, "Out of memory");
|
||||||
|
|||||||
Reference in New Issue
Block a user