mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-01 03:34:39 +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;
|
||||
/* TODO: check this is the HW serial number OID - no test data. */
|
||||
|
||||
/* Allocate space for HW serial number. */
|
||||
cert->hwSerialNum = (byte*)XMALLOC(serialLen, cert->heap,
|
||||
/* Allocate space for HW serial number, +1 for null terminator. */
|
||||
cert->hwSerialNum = (byte*)XMALLOC(serialLen + 1, cert->heap,
|
||||
DYNAMIC_TYPE_X509_EXT);
|
||||
if (cert->hwSerialNum == NULL) {
|
||||
WOLFSSL_MSG("\tOut of Memory");
|
||||
|
Reference in New Issue
Block a user