From ce61653a9ac24270d45e8e46d545ff7a58475528 Mon Sep 17 00:00:00 2001 From: Daniel Pouzzner Date: Tue, 28 Jun 2022 18:18:42 -0500 Subject: [PATCH] wolfcrypt/src/asn.c: fixes for ARM portability (GetASN_Items()), unintended fallthrough (OidFromId()), and uninitialized variable (DecodeSubjInfoAcc()). --- wolfcrypt/src/asn.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wolfcrypt/src/asn.c b/wolfcrypt/src/asn.c index 907e34727..4c08820fc 100644 --- a/wolfcrypt/src/asn.c +++ b/wolfcrypt/src/asn.c @@ -1329,7 +1329,7 @@ int GetASN_Items(const ASNItem* asn, ASNGetData *data, int count, int complete, word32 endIdx[GET_ASN_MAX_DEPTH] = { length, length, length, length, length, length, length }; /* Set choices to -1 to indicate they haven't been seen or found. */ - char choiceMet[GET_ASN_MAX_CHOICES] = { -1, -1 }; + signed char choiceMet[GET_ASN_MAX_CHOICES] = { -1, -1 }; /* Not matching a choice right now. */ int choice = 0; /* Current depth of ASN.1 item. */ @@ -4728,6 +4728,7 @@ const byte* OidFromId(word32 id, word32 type, word32* oidSz) case AIA_CA_REPO_OID: oid = extAuthInfoCaRespOid; *oidSz = sizeof(extAuthInfoCaRespOid); + break; #endif /* WOLFSSL_SUBJ_INFO_ACC */ default: break; @@ -17300,7 +17301,7 @@ static int DecodeSubjInfoAcc(const byte* input, int sz, DecodedCert* cert) */ while (idx < (word32)sz) { - word32 oid; + word32 oid = 0; byte b; /* Unwrap an AccessDescription */