Move definition to beginning of block

This commit is contained in:
Colton Willey
2024-05-29 17:02:29 -07:00
parent b00ae2ac69
commit af537a6ae3

View File

@ -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. */