From 12192b7683692a5cf2fd87c91515a57e7be23f65 Mon Sep 17 00:00:00 2001 From: Andras Fekete Date: Tue, 19 Dec 2023 15:54:25 -0500 Subject: [PATCH] Set result to invalid as first step --- wolfcrypt/src/port/aria/aria-cryptocb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wolfcrypt/src/port/aria/aria-cryptocb.c b/wolfcrypt/src/port/aria/aria-cryptocb.c index e69fd3e35..253fc804e 100644 --- a/wolfcrypt/src/port/aria/aria-cryptocb.c +++ b/wolfcrypt/src/port/aria/aria-cryptocb.c @@ -265,12 +265,12 @@ int wc_AriaVerify(byte* sig, word32 sigSz, byte* hash, word32 hashSz, WOLFSSL_ENTER("AriaVerify"); + *res = 0; /* Default to invalid signature */ + if (sig == NULL || hash == NULL || res == NULL || key == NULL) { return BAD_FUNC_ARG; } - *res = 0; /* Default to invalid signature */ - if (rv == MC_OK) rv = wc_AriaInit();