diff --git a/wolfcrypt/src/asn.c b/wolfcrypt/src/asn.c index 884e66ae5..2d203439d 100644 --- a/wolfcrypt/src/asn.c +++ b/wolfcrypt/src/asn.c @@ -5572,7 +5572,7 @@ static int SetRsaPublicKey(byte* output, RsaKey* key, n[0] = ASN_INTEGER; nSz = SetLength(rawLen, n + 1) + 1; /* int tag */ - if ( (nSz + rawLen) < MAX_RSA_INT_SZ) { + if ( (nSz + rawLen) <= MAX_RSA_INT_SZ) { if (leadingBit) n[nSz] = 0; #ifdef HAVE_USER_RSA