Fixes #10283
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Patrick Steuer <patrick.steuer@de.ibm.com>
(Merged from https://github.com/openssl/openssl/pull/10296)
{
size_t cnt;
const OSSL_PARAM *p;
- OSSL_PARAM *params, *q;
+ OSSL_PARAM *params = NULL, *q;
for (cnt = 1, p = paramdefs; p->key != NULL; p++, cnt++)
continue;
params = OPENSSL_zalloc(cnt * sizeof(*params));
+ if (params == NULL)
+ return NULL;
for (p = paramdefs, q = params; ; p++, q++) {
*q = *p;
return NULL;
data = OPENSSL_zalloc(space);
+ if (data == NULL)
+ return NULL;
for (space = 0, p = params; p->key != NULL; p++) {
p->data = data + space;