Commit 5e3553c2 authored by Kurt Roeckx's avatar Kurt Roeckx
Browse files

Return error when trying to print invalid ASN1 integer



Reviewed-by: default avatarRich Salz <rsalz@openssl.org>
GH: #1322
parent 85afea67
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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);