coverity noted a recent change made a call to OSSL_PARAM_get_size_t
without checking the return code, as is practice in all other call
sites.
Just add the check.
Fixes openssl/private#551
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/24860)
goto err;
p = OSSL_PARAM_locate(params + params_n_allocstart, "size");
- if (p != NULL)
- OSSL_PARAM_get_size_t(p, &size_val);
+ if (p != NULL) {
+ if (!OSSL_PARAM_get_size_t(p, &size_val))
+ goto err;
+ }
if ((ctx = EVP_MAC_CTX_new(expected->mac)) == NULL) {
t->err = "MAC_CREATE_ERROR";