Fixed a crash in print_notice.
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2935)
This commit is contained in:
parent
dda12ce4e5
commit
29d1fad788
1 changed files with 9 additions and 3 deletions
|
@ -413,9 +413,15 @@ static void print_notice(BIO *out, USERNOTICE *notice, int indent)
|
||||||
num = sk_ASN1_INTEGER_value(ref->noticenos, i);
|
num = sk_ASN1_INTEGER_value(ref->noticenos, i);
|
||||||
if (i)
|
if (i)
|
||||||
BIO_puts(out, ", ");
|
BIO_puts(out, ", ");
|
||||||
tmp = i2s_ASN1_INTEGER(NULL, num);
|
if (num == NULL)
|
||||||
BIO_puts(out, tmp);
|
BIO_puts(out, "(null)");
|
||||||
OPENSSL_free(tmp);
|
else {
|
||||||
|
tmp = i2s_ASN1_INTEGER(NULL, num);
|
||||||
|
if (tmp == NULL)
|
||||||
|
return;
|
||||||
|
BIO_puts(out, tmp);
|
||||||
|
OPENSSL_free(tmp);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
BIO_puts(out, "\n");
|
BIO_puts(out, "\n");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue