Browse Source

Merge pull request #4361 from julek-wolfssl/GetASNHeader-return

Missing `GetASNHeader` return handling
David Garske 2 years ago
parent
commit
03fba72027
1 changed files with 2 additions and 0 deletions
  1. 2 0
      wolfcrypt/src/asn.c

+ 2 - 0
wolfcrypt/src/asn.c

@@ -26137,6 +26137,8 @@ int wc_EccPublicKeyDecode(const byte* input, word32* inOutIdx,
                     == 0 && tag == ASN_BIT_STRING) {
                 len = 0;
                 ret = GetASNHeader(input, ASN_BIT_STRING, inOutIdx, &len, inSz);
+                if (ret > 0)
+                    ret = 0; /* reset on success */
                 *inOutIdx += len;
             }
         }