mirror of
https://github.com/openssl/openssl.git
synced 2024-11-27 05:21:51 +08:00
Return error when trying to print invalid ASN1 integer
Reviewed-by: Rich Salz <rsalz@openssl.org> GH: #1322
This commit is contained in:
parent
85afea67f5
commit
5e3553c2de
@ -393,6 +393,8 @@ static int asn1_print_integer(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 New Issue
Block a user