Fixes: https://github.com/openssl/project/issues/1267
Signed-off-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27989)
void *tmp_pub;
void *tmp_priv;
+ if (key == NULL)
+ return NULL;
/*
* Partially decoded keys, not yet imported or loaded, should never be
* duplicated.
if (ossl_ml_kem_decoded_key(key))
return NULL;
- if (key == NULL)
- return NULL;
else if ((ret = OPENSSL_memdup(key, sizeof(*key))) == NULL)
return NULL;