]> git.ipfire.org Git - thirdparty/openssl.git/commit
openssl rehash: add check for OPENSSL_strdup
authorJiasheng Jiang <jiasheng@iscas.ac.cn>
Thu, 10 Feb 2022 03:21:47 +0000 (11:21 +0800)
committerTomas Mraz <tomas@openssl.org>
Mon, 14 Feb 2022 09:03:42 +0000 (10:03 +0100)
commit79cda38cff834224fb9d86dc7433b4f60688ce49
tree431b0474afb48d691428424da5fa89495e56c4f0
parentbb2fb5d7cc6c4abc888c3fd6df4366b6dfde25a6
openssl rehash: add check for OPENSSL_strdup

As the potential failure of the memory allocation,
it should be better to check the return value of
OPENSSL_strdup() and return error if fails.
Also, we need to restore the 'ep' to be NULL if fails.

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/17676)
apps/rehash.c