Commit a7e974c7 authored by mrpre's avatar mrpre Committed by Rich Salz
Browse files

check bn_new return value



Slightly modified from the original PR.
Signed-off-by: default avatarRich Salz <rsalz@akamai.com>
Reviewed-by: default avatarRichard Levitte <levitte@openssl.org>
parent 124055a9
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -163,8 +163,8 @@ static int bn_c2i(ASN1_VALUE **pval, const unsigned char *cont, int len,
{
    BIGNUM *bn;

    if (!*pval)
        bn_new(pval, it);
    if (*pval == NULL && !bn_new(pval, it))
        return 0;
    bn = (BIGNUM *)*pval;
    if (!BN_bin2bn(cont, len, bn)) {
        bn_free(pval, it);