mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-02 12:14:38 +02:00
account for null terminator with SEP serail number
This commit is contained in:
@@ -16694,8 +16694,8 @@ static int DecodeSEP(ASNGetData* dataASN, DecodedCert* cert)
|
|||||||
cert->hwTypeSz = (int)oidLen;
|
cert->hwTypeSz = (int)oidLen;
|
||||||
/* TODO: check this is the HW serial number OID - no test data. */
|
/* TODO: check this is the HW serial number OID - no test data. */
|
||||||
|
|
||||||
/* Allocate space for HW serial number. */
|
/* Allocate space for HW serial number, +1 for null terminator. */
|
||||||
cert->hwSerialNum = (byte*)XMALLOC(serialLen, cert->heap,
|
cert->hwSerialNum = (byte*)XMALLOC(serialLen + 1, cert->heap,
|
||||||
DYNAMIC_TYPE_X509_EXT);
|
DYNAMIC_TYPE_X509_EXT);
|
||||||
if (cert->hwSerialNum == NULL) {
|
if (cert->hwSerialNum == NULL) {
|
||||||
WOLFSSL_MSG("\tOut of Memory");
|
WOLFSSL_MSG("\tOut of Memory");
|
||||||
|
Reference in New Issue
Block a user