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);
|
||||
if (i)
|
||||
BIO_puts(out, ", ");
|
||||
tmp = i2s_ASN1_INTEGER(NULL, num);
|
||||
BIO_puts(out, tmp);
|
||||
OPENSSL_free(tmp);
|
||||
if (num == NULL)
|
||||
BIO_puts(out, "(null)");
|
||||
else {
|
||||
tmp = i2s_ASN1_INTEGER(NULL, num);
|
||||
if (tmp == NULL)
|
||||
return;
|
||||
BIO_puts(out, tmp);
|
||||
OPENSSL_free(tmp);
|
||||
}
|
||||
}
|
||||
BIO_puts(out, "\n");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue