]> git.ipfire.org Git - thirdparty/openssl.git/commit
bio_enc.c: add check for BIO_new_mem_buf
authorJiasheng Jiang <jiasheng@iscas.ac.cn>
Fri, 18 Feb 2022 02:13:08 +0000 (10:13 +0800)
committerPauli <pauli@openssl.org>
Thu, 24 Feb 2022 00:23:31 +0000 (11:23 +1100)
commitcf21d1c62dcd92be624ea0fb8a86d91e4fbeed93
tree06fae45c342905ae7a25c3d485f1e271fa78333f
parentcbb6f4dbf0ce42b4cc4385d7b95236710504068d
bio_enc.c: add check for BIO_new_mem_buf

Since the memory allocation may fail, the BIO_new_mem_buf() may
return NULL pointer.
Therefore, it should be better to check it 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/17730)
test/bio_enc_test.c