From af537a6ae3872e9d14b19aba7fc17be8c750f666 Mon Sep 17 00:00:00 2001 From: Colton Willey Date: Wed, 29 May 2024 17:02:29 -0700 Subject: [PATCH] Move definition to beginning of block --- wolfcrypt/src/asn.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wolfcrypt/src/asn.c b/wolfcrypt/src/asn.c index ee019dc50..174f62e04 100644 --- a/wolfcrypt/src/asn.c +++ b/wolfcrypt/src/asn.c @@ -18975,6 +18975,8 @@ static int DecodeAltNames(const byte* input, word32 sz, DecodedCert* cert) } while ((ret == 0) && (idx < sz)) { + ASNGetData dataASN[altNameASN_Length]; + numNames++; if (numNames > WOLFSSL_MAX_ALT_NAMES) { WOLFSSL_MSG("\tToo many subject alternative names"); @@ -18982,8 +18984,6 @@ static int DecodeAltNames(const byte* input, word32 sz, DecodedCert* cert) break; } - ASNGetData dataASN[altNameASN_Length]; - /* Clear dynamic data items. */ XMEMSET(dataASN, 0, sizeof(dataASN)); /* Parse GeneralName with the choices supported. */