diff options
author | Jiasheng Jiang <jiasheng@iscas.ac.cn> | 2022-02-16 11:27:23 +0800 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2022-02-17 13:01:42 +0100 |
commit | ba0b60c632ae9c5590b59184281baaf0a39f0c24 (patch) | |
tree | 1b25dc59ef3cb0be43343b933636e0748bbb9bf0 /test/recipes/15-test_gendhparam.t | |
parent | 8f084b43803d53e15d83ed130210f026f84679ff (diff) |
apps/s_server: Add missing check for BIO_new
As the potential failure of the BIO_new(), it should be better to check the return value and return error if fails in order to avoid the dereference of NULL pointer.
And because 'bio_s_msg' is checked before being used everytime, which has no need to add the check.
But 'bio_s_out' is not.
And since the check 'if (bio_s_out == NULL)' is redundant, it can be removed to make the code succincter.
Also the 'sbio' and so forth should be checked like the other places in the same file.
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17710)
Diffstat (limited to 'test/recipes/15-test_gendhparam.t')
0 files changed, 0 insertions, 0 deletions