test/evp_test.c: Add check for OPENSSL_strdup
authorJiasheng Jiang <jiasheng@iscas.ac.cn>
Fri, 17 Jun 2022 08:57:15 +0000 (16:57 +0800)
committerPauli <pauli@openssl.org>
Wed, 22 Jun 2022 07:01:00 +0000 (17:01 +1000)
commit6408e7cf8acad6f816268f2f62e17c8c0985c1c3
tree312c3b21b7d324b99300bf34038c7b53fb1bcbc3
parenta58978f1bf44706f88395d9011a7be405a0c6e4b
test/evp_test.c: Add check for OPENSSL_strdup

As the potential failure of the OPENSSL_strdup(),
it should be better to check the return value and
return error if fails.

Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18592)

(cherry picked from commit 5203a8dfdc209f05c7dbd9c1e5208743fcaa6752)
test/evp_test.c