Add return value check of X509V3_add_value() in X509V3_parse_list()
authorZhou Qingyang <zhou1615@umn.edu>
Sun, 10 Apr 2022 18:05:19 +0000 (02:05 +0800)
committerTomas Mraz <tomas@openssl.org>
Tue, 12 Apr 2022 11:07:08 +0000 (13:07 +0200)
commitbcd5645b34c319b8e4d72d6850ead80e85f18921
treefbc6576db70405da5a87a30a538792fca321aa81
parent42f111ad41141e2ecd67f0a6954625a5ad01890b
Add return value check of X509V3_add_value() in X509V3_parse_list()

X509V3_add_value() will return 0 on malloc failure, which could lead to
err logic in X509V3_parse_list().

Fix this by adding return value check of X509V3_add_value().

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18077)
crypto/x509/v3_utl.c