Commit ef727bc5 authored by Bernd Edlinger's avatar Bernd Edlinger Committed by Rich Salz
Browse files

Fixed a crash in print_notice.



Reviewed-by: default avatarRichard Levitte <levitte@openssl.org>
Reviewed-by: default avatarRich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2935)
(cherry picked from commit 29d1fad7)
parent 71683a1d
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -413,10 +413,16 @@ static void print_notice(BIO *out, USERNOTICE *notice, int indent)
            num = sk_ASN1_INTEGER_value(ref->noticenos, i);
            if (i)
                BIO_puts(out, ", ");
            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");
    }
    if (notice->exptext)