mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-01 03:34:39 +02:00
Fixed CID 212170.
This commit is contained in:
@@ -1820,6 +1820,7 @@ static int wc_PKCS12_encrypt_content(WC_PKCS12* pkcs12, WC_RNG* rng,
|
||||
idx += SetObjectId(sizeof(WC_PKCS12_DATA_OID), out + idx);
|
||||
if (idx + sizeof(WC_PKCS12_DATA_OID) > *outSz){
|
||||
WOLFSSL_MSG("Buffer not large enough for DATA OID");
|
||||
XFREE(tmp, heap, DYNAMIC_TYPE_TMP_BUFFER);
|
||||
return BUFFER_E;
|
||||
}
|
||||
XMEMCPY(out + idx, WC_PKCS12_DATA_OID, sizeof(WC_PKCS12_DATA_OID));
|
||||
@@ -1827,6 +1828,7 @@ static int wc_PKCS12_encrypt_content(WC_PKCS12* pkcs12, WC_RNG* rng,
|
||||
|
||||
/* copy over encrypted data */
|
||||
if (idx + encSz > *outSz){
|
||||
XFREE(tmp, heap, DYNAMIC_TYPE_TMP_BUFFER);
|
||||
return BUFFER_E;
|
||||
}
|
||||
XMEMCPY(out + idx, tmp, encSz);
|
||||
|
Reference in New Issue
Block a user