Use MAX_OID_SZ

This commit is contained in:
Anthony Hu
2022-03-09 17:20:50 -05:00
parent b043225dbd
commit 98f733767b
2 changed files with 3 additions and 3 deletions

View File

@@ -5119,7 +5119,7 @@ static int DumpOID(const byte* oidData, word32 oidSz, word32 oid,
#ifdef HAVE_OID_DECODING
{
word16 decOid[16];
word16 decOid[MAX_OID_SZ];
word32 decOidSz = sizeof(decOid);
/* Decode the OID into dotted form. */
ret = DecodeObjectId(oidData, oidSz, decOid, &decOidSz);
@@ -16978,7 +16978,7 @@ end:
&isUnknownExt);
#if defined(WOLFSSL_CUSTOM_OID) && defined(HAVE_OID_DECODING)
if (isUnknownExt && (cert->unknownExtCallback != NULL)) {
word16 decOid[16];
word16 decOid[MAX_OID_SZ];
word32 decOidSz = sizeof(decOid);
ret = DecodeObjectId(
dataASN[CERTEXTASN_IDX_OID].data.oid.data,

View File

@@ -4049,7 +4049,7 @@ int wc_ecc_get_curve_id_from_oid(const byte* oid, word32 len)
int curve_idx;
#ifdef HAVE_OID_DECODING
int ret;
word16 decOid[16];
word16 decOid[MAX_OID_SZ];
word32 decOidSz = sizeof(decOid);
#endif