From 48b39a34c79cb5f3dfd40be2c2db8ed2c4d4c31d Mon Sep 17 00:00:00 2001 From: Juliusz Sosinowicz Date: Thu, 16 Jan 2020 00:40:41 +0100 Subject: [PATCH] Properly Init mp_int number --- src/ssl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ssl.c b/src/ssl.c index 3853ba4db..86effec32 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -34589,6 +34589,10 @@ int wolfSSL_EC_POINT_get_affine_coordinates_GFp(const WOLFSSL_EC_GROUP *group, } if (!wolfSSL_BN_is_one(point->Z)) { + if (mp_init(&modulus) != MP_OKAY) { + WOLFSSL_MSG("mp_init failed"); + return WOLFSSL_FAILURE; + } /* Map the Jacobian point back to affine space */ if (mp_read_radix(&modulus, ecc_sets[group->curve_idx].prime, MP_RADIX_HEX) != MP_OKAY) { WOLFSSL_MSG("mp_read_radix failed");