X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=crypto%2Fbn%2Fbn_div.c;h=2857f44861a702bfc85e380e99db562a7c07ec13;hb=07645deeb8cc203951c1794a0fde54af8f877393;hp=556fcda1e3686d88745550a8099b501ed81be154;hpb=a8aa764d3c96eb65b22863cdc5f6ab08d92dd355;p=oweals%2Fopenssl.git diff --git a/crypto/bn/bn_div.c b/crypto/bn/bn_div.c index 556fcda1e3..2857f44861 100644 --- a/crypto/bn/bn_div.c +++ b/crypto/bn/bn_div.c @@ -185,10 +185,8 @@ int BN_div(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num, const BIGNUM *divisor, BN_ULONG d0,d1; int num_n,div_n; - if (dv) - bn_check_top(dv); - if (rm) - bn_check_top(rm); + bn_check_top(dv); + bn_check_top(rm); bn_check_top(num); bn_check_top(divisor); @@ -214,7 +212,6 @@ int BN_div(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num, const BIGNUM *divisor, res=BN_CTX_get(ctx); else res=dv; if (sdiv == NULL || res == NULL) goto err; - tmp->neg=0; /* First we normalise the numbers */ norm_shift=BN_BITS2-((BN_num_bits(divisor))%BN_BITS2); @@ -395,8 +392,7 @@ X) -> 0x%08X\n", BN_CTX_end(ctx); return(1); err: - if (rm) - bn_check_top(rm); + bn_check_top(rm); BN_CTX_end(ctx); return(0); }