diff options
author | xkernel <xkernel.wang@foxmail.com> | 2022-06-20 11:46:39 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2022-07-05 08:08:12 +0200 |
commit | 9ef1f848a646565d4dd86e56542cf921d4921ad9 (patch) | |
tree | d0257f6376f41b88be8a1c40d39d9d8e1e46eaaf | |
parent | Increase test coverage by enabling more build options (diff) | |
download | openssl-9ef1f848a646565d4dd86e56542cf921d4921ad9.tar.xz openssl-9ef1f848a646565d4dd86e56542cf921d4921ad9.zip |
v3_sxnet: add a check for the return of i2s_ASN1_INTEGER()
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Ben Kaduk <kaduk@mit.edu>
(Merged from https://github.com/openssl/openssl/pull/18608)
-rw-r--r-- | crypto/x509/v3_sxnet.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/x509/v3_sxnet.c b/crypto/x509/v3_sxnet.c index a433196820..5ac3bab354 100644 --- a/crypto/x509/v3_sxnet.c +++ b/crypto/x509/v3_sxnet.c @@ -78,6 +78,8 @@ static int sxnet_i2r(X509V3_EXT_METHOD *method, SXNET *sx, BIO *out, for (i = 0; i < sk_SXNETID_num(sx->ids); i++) { id = sk_SXNETID_value(sx->ids, i); tmp = i2s_ASN1_INTEGER(NULL, id->zone); + if (tmp == NULL) + return 0; BIO_printf(out, "\n%*sZone: %s, User: ", indent, "", tmp); OPENSSL_free(tmp); ASN1_STRING_print(out, id->user); |