diff options
author | Kurt Roeckx <kurt@roeckx.be> | 2016-07-16 16:56:54 +0200 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2016-08-04 22:22:07 +0100 |
commit | 32baafb2f6fb2a424824df08232d86765f554880 (patch) | |
tree | 02832bd71448f815aafa3f2a50f6f33ec6c88dae | |
parent | 81f69e5b69b8e87ca5d7080ab643ebda7808542c (diff) |
Return error when trying to print invalid ASN1 integer
GH: #1322
(cherry picked from commit 5e3553c2de9a365479324b8ba8b998f0cce3e527)
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Stephen Henson <steve@openssl.org>
-rw-r--r-- | crypto/asn1/tasn_prn.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/asn1/tasn_prn.c b/crypto/asn1/tasn_prn.c index 1dae46bc3d..f628caddbd 100644 --- a/crypto/asn1/tasn_prn.c +++ b/crypto/asn1/tasn_prn.c @@ -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); |