openssl/crypto/rand
Jiasheng Jiang 09dca55733 rand: Add missing check for rand_get_global
As the potential failure of the rand_get_global(),
for example fail to get lock, 'dgbl' could be NULL
pointer and be dereferenced later.
Therefore, it should be better to check it and return
error if fails, like RAND_get0_primary() and other callers.

Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/17690)
2022-02-20 13:09:27 +01:00
..
build.info Elimination of some sources not needed in the FIPS_MODULE 2021-06-07 08:37:09 +02:00
prov_seed.c Update copyright year 2021-04-08 13:04:41 +01:00
rand_deprecated.c Move e_os.h to include/internal 2022-02-05 05:31:09 +01:00
rand_egd.c Fix typos 2022-01-05 12:37:20 +01:00
rand_err.c err: remove the derivation function is mandatory for FIPS error message since it's no longer used and newly introduced 2021-07-20 18:34:07 +10:00
rand_lib.c rand: Add missing check for rand_get_global 2022-02-20 13:09:27 +01:00
rand_local.h Elimination of some sources not needed in the FIPS_MODULE 2021-06-07 08:37:09 +02:00
rand_meth.c Elimination of some sources not needed in the FIPS_MODULE 2021-06-07 08:37:09 +02:00
rand_pool.c Update copyright year 2021-04-08 13:04:41 +01:00
randfile.c fix some code with obvious wrong coding style 2021-10-28 13:10:46 +10:00