Return error when trying to print invalid ASN1 integer
GH: #1322
(cherry picked from commit 5e3553c2de
)
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Stephen Henson <steve@openssl.org>
This commit is contained in:
parent
81f69e5b69
commit
32baafb2f6
1 changed files with 2 additions and 0 deletions
|
@ -447,6 +447,8 @@ static int asn1_print_integer_ctx(BIO *out, ASN1_INTEGER *str,
|
|||
char *s;
|
||||
int ret = 1;
|
||||
s = i2s_ASN1_INTEGER(NULL, str);
|
||||
if (s == NULL)
|
||||
return 0;
|
||||
if (BIO_puts(out, s) <= 0)
|
||||
ret = 0;
|
||||
OPENSSL_free(s);
|
||||
|
|
Loading…
Reference in a new issue