1
0
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:
Jakub Jelen
2024-04-12 14:39:32 +02:00
parent 0882338142
commit b815ca08b3

View File

@@ -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;