Skip to content

Commit 9ef1f84

Browse files
x2018levitte
authored andcommitted
v3_sxnet: add a check for the return of i2s_ASN1_INTEGER()
Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Ben Kaduk <[email protected]> (Merged from openssl#18608)
1 parent c267588 commit 9ef1f84

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

crypto/x509/v3_sxnet.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ static int sxnet_i2r(X509V3_EXT_METHOD *method, SXNET *sx, BIO *out,
7878
for (i = 0; i < sk_SXNETID_num(sx->ids); i++) {
7979
id = sk_SXNETID_value(sx->ids, i);
8080
tmp = i2s_ASN1_INTEGER(NULL, id->zone);
81+
if (tmp == NULL)
82+
return 0;
8183
BIO_printf(out, "\n%*sZone: %s, User: ", indent, "", tmp);
8284
OPENSSL_free(tmp);
8385
ASN1_STRING_print(out, id->user);

0 commit comments

Comments
 (0)