]> git.ipfire.org Git - thirdparty/openssl.git/commit
test/helpers/handshake.c: Add check for OPENSSL_strdup
authorJiasheng Jiang <jiasheng@iscas.ac.cn>
Tue, 15 Feb 2022 02:46:38 +0000 (10:46 +0800)
committerTomas Mraz <tomas@openssl.org>
Wed, 16 Feb 2022 10:09:59 +0000 (11:09 +0100)
commit17da5f2af833ef16cc2e431359139a4a2e3775b9
tree50720b70a4863b2e28650514e7a874b30271c64d
parentb926548b362531e8a64e7482c081611fab7183a8
test/helpers/handshake.c: Add check for OPENSSL_strdup

As the potential failure of the memory allocation, the OPENSSL_strdup()
could return NULL pointer and then be assigned to 'server_ctx'.
In order to tell the callers the failure of the configuration, it should
be better to return error.

Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17705)
test/helpers/handshake.c