openssl/crypto/bio
Jiasheng Jiang 7f1cb465c1 BIO_new_from_core_bio: Check for NULL pointer after calling get_globals
The get_globals could return NULL, for example,
CRYPTO_THREAD_read_lock() failed.
Therefore, just checking the member of 'bcgbl' is not enough.
We need to check 'bcgbl' itself too in order to avoid the dereference of
the NULL pointer.
And the caller of ossl_bio_init_core(), OSSL_LIB_CTX_new_from_dispatch()
in `crypto/context.c`, has already checked return value and dealed with
the situation if it returns 0.

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

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17581)
2022-01-27 17:46:19 +01:00
..
bf_buff.c
bf_lbuf.c
bf_nbio.c
bf_null.c
bf_prefix.c
bf_readbuff.c
bio_addr.c fix some code with obvious wrong coding style 2021-10-28 13:10:46 +10:00
bio_cb.c
bio_dump.c
bio_err.c
bio_lib.c BIO_ctrl: Avoid spurious error being raised on NULL bio parameter 2021-09-28 12:12:32 +02:00
bio_local.h
bio_meth.c
bio_print.c crypto/bio: drop float formating for UEFI 2022-01-21 12:44:30 +01:00
bio_sock2.c
bio_sock.c
bss_acpt.c
bss_bio.c crypto/bio/bss_bio.c/bio_write: improve border check 2021-09-07 16:01:53 +02:00
bss_conn.c BIO_s_connect(): Enable BIO_gets() 2021-11-15 14:40:16 +01:00
bss_core.c BIO_new_from_core_bio: Check for NULL pointer after calling get_globals 2022-01-27 17:46:19 +01:00
bss_dgram.c
bss_fd.c
bss_file.c
bss_log.c
bss_mem.c Avoid NULL+X UB in bss_mem.c 2021-10-19 12:16:11 +02:00
bss_null.c
bss_sock.c
build.info
ossl_core_bio.c