From df0b9ed8890f8bc64463545905744df1c87b9a02 Mon Sep 17 00:00:00 2001 From: Jacob Barthelmeh Date: Tue, 3 Mar 2020 14:33:00 -0700 Subject: [PATCH] init on mp_int r and s --- src/internal.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/internal.c b/src/internal.c index 5869436..fbd3ee1 100644 --- a/src/internal.c +++ b/src/internal.c @@ -3543,6 +3543,12 @@ static int DoUserAuthRequestEcc(WOLFSSH* ssh, WS_UserAuthData_PublicKey* pk, ret = GetUint32(&sz, pk->signature, pk->signatureSz, &i); } + if (ret == WS_SUCCESS) { + if (mp_init(&r) != MP_OKAY) { + ret = WS_FATAL_ERROR; + } + } + if (ret == WS_SUCCESS) { ret = mp_read_unsigned_bin(&r, pk->signature + i, sz); if (ret != 0) @@ -3556,6 +3562,12 @@ static int DoUserAuthRequestEcc(WOLFSSH* ssh, WS_UserAuthData_PublicKey* pk, ret = GetUint32(&sz, pk->signature, pk->signatureSz, &i); } + if (ret == WS_SUCCESS) { + if (mp_init(&s) != MP_OKAY) { + ret = WS_FATAL_ERROR; + } + } + if (ret == WS_SUCCESS) { ret = mp_read_unsigned_bin(&s, pk->signature + i, sz); if (ret != 0)