]> git.ipfire.org Git - thirdparty/openssl.git/commit - test/evp_test.c
evp_test: Add the missing check after calling OPENSSL_malloc
authorJiasheng Jiang <jiasheng@iscas.ac.cn>
Mon, 24 Jan 2022 03:06:34 +0000 (11:06 +0800)
committerTomas Mraz <tomas@openssl.org>
Tue, 25 Jan 2022 17:15:22 +0000 (18:15 +0100)
commit2208ba56ebefe4cf7d924e2ac7044ccd3307250b
treeaca08b0300673561cc42a657588af5004f4e6d8c
parent954f45ba4c504570206ff5bed811e512cf92dc8e
evp_test: Add the missing check after calling OPENSSL_malloc

The OPENSSL_zalloc() could return NULL pointer if fails.
Add the check for it does make sense, like how digest_test_init() deals
with.

CLA: trivial

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/17571)
test/evp_test.c