mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-12-09 15:41:10 +03:00
mbedcrypto: Initialize mpi structs to avoid crashes
Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Sahana Prasad <sahana@redhat.com>
This commit is contained in:
@@ -886,12 +886,12 @@ ssh_string pki_key_to_blob(const ssh_key key, enum ssh_key_e type)
|
|||||||
ssh_string n = NULL;
|
ssh_string n = NULL;
|
||||||
ssh_string str = NULL;
|
ssh_string str = NULL;
|
||||||
#if MBEDTLS_VERSION_MAJOR > 2
|
#if MBEDTLS_VERSION_MAJOR > 2
|
||||||
mbedtls_mpi E;
|
mbedtls_mpi E = {0};
|
||||||
mbedtls_mpi N;
|
mbedtls_mpi N = {0};
|
||||||
mbedtls_mpi D;
|
mbedtls_mpi D = {0};
|
||||||
mbedtls_mpi IQMP;
|
mbedtls_mpi IQMP = {0};
|
||||||
mbedtls_mpi P;
|
mbedtls_mpi P = {0};
|
||||||
mbedtls_mpi Q;
|
mbedtls_mpi Q = {0};
|
||||||
#endif
|
#endif
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user