mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 02:37:28 +02:00
check on allocation of new node before dereferencing
This commit is contained in:
@ -13965,7 +13965,9 @@ int wolfSSL_X509_REQ_add1_attr_by_NID(WOLFSSL_X509 *req,
|
||||
else {
|
||||
if (req->reqAttributes == NULL) {
|
||||
req->reqAttributes = wolfSSL_sk_new_node(req->heap);
|
||||
req->reqAttributes->type = STACK_TYPE_X509_REQ_ATTR;
|
||||
if (req->reqAttributes != NULL) {
|
||||
req->reqAttributes->type = STACK_TYPE_X509_REQ_ATTR;
|
||||
}
|
||||
}
|
||||
ret = wolfSSL_sk_push(req->reqAttributes, attr);
|
||||
}
|
||||
|
Reference in New Issue
Block a user