diff --git a/wolfcrypt/src/asn.c b/wolfcrypt/src/asn.c index 3ee47af19..b46f7812d 100644 --- a/wolfcrypt/src/asn.c +++ b/wolfcrypt/src/asn.c @@ -16166,6 +16166,10 @@ static int ASNToHexString(const byte* input, word32* inOutIdx, char** out, } str = (char*)XMALLOC(len * 2 + 1, heap, heapType); + if (str == NULL) { + return MEMORY_E; + } + for (i=0; i