forked from wolfSSL/wolfssl
help out static analysis tool
This commit is contained in:
@ -784,9 +784,6 @@ int wc_i2d_PKCS12(WC_PKCS12* pkcs12, byte** der, int* derSz)
|
|||||||
if (*der == NULL) {
|
if (*der == NULL) {
|
||||||
/* Allocate if requested */
|
/* Allocate if requested */
|
||||||
buf = (byte*)XMALLOC(totalSz, NULL, DYNAMIC_TYPE_PKCS);
|
buf = (byte*)XMALLOC(totalSz, NULL, DYNAMIC_TYPE_PKCS);
|
||||||
if (buf == NULL) {
|
|
||||||
ret = MEMORY_E;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
buf = *der;
|
buf = *der;
|
||||||
@ -802,6 +799,10 @@ int wc_i2d_PKCS12(WC_PKCS12* pkcs12, byte** der, int* derSz)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (buf == NULL) {
|
||||||
|
ret = MEMORY_E;
|
||||||
|
}
|
||||||
|
|
||||||
if (ret == 0) {
|
if (ret == 0) {
|
||||||
idx = 0;
|
idx = 0;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user