From 6c55701725f66c964ca7372e16c22c4634bf9051 Mon Sep 17 00:00:00 2001 From: Jacob Barthelmeh Date: Fri, 10 Feb 2017 10:09:45 -0700 Subject: [PATCH] c89 build with ECC compresed key --- wolfcrypt/src/ecc.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/wolfcrypt/src/ecc.c b/wolfcrypt/src/ecc.c index f5a9b2d42..0aabb65c2 100644 --- a/wolfcrypt/src/ecc.c +++ b/wolfcrypt/src/ecc.c @@ -3891,10 +3891,10 @@ int wc_ecc_import_point_der(byte* in, word32 inLen, const int curve_idx, #ifdef HAVE_COMP_KEY if (err == MP_OKAY && compressed == 1) { /* build y */ mp_int t1, t2; - DECLARE_CURVE_SPECS(3) - int did_init = 0; + DECLARE_CURVE_SPECS(3) + if (mp_init_multi(&t1, &t2, NULL, NULL, NULL, NULL) != MP_OKAY) err = MEMORY_E; else @@ -4495,10 +4495,11 @@ int wc_ecc_import_x963_ex(const byte* in, word32 inLen, ecc_key* key, #ifdef HAVE_COMP_KEY if (err == MP_OKAY && compressed == 1) { /* build y */ - DECLARE_CURVE_SPECS(3) mp_int t1, t2; int did_init = 0; + DECLARE_CURVE_SPECS(3) + if (mp_init_multi(&t1, &t2, NULL, NULL, NULL, NULL) != MP_OKAY) err = MEMORY_E; else