X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=crypto%2Fbn%2Fbn_mul.c;h=e0c8ade99652daeb178b85ad82f4bfeaa7c35254;hb=f8000b93459cff7468c0a86dec913d06c0f0b6d6;hp=b4ed7e23e62daa6a0864c2e59f3117c011960cf1;hpb=765e5311590b9970d8bd33771fb198cea30b0c05;p=oweals%2Fopenssl.git diff --git a/crypto/bn/bn_mul.c b/crypto/bn/bn_mul.c index b4ed7e23e6..e0c8ade996 100644 --- a/crypto/bn/bn_mul.c +++ b/crypto/bn/bn_mul.c @@ -66,7 +66,7 @@ #include "cryptlib.h" #include "bn_lcl.h" -#if defined(NO_ASM) +#if defined(OPENSSL_NO_ASM) || !defined(__i386) /* Assembler implementation exists only for x86 */ /* Here follows specialised variants of bn_add_words() and bn_sub_words(). They have the property performing operations on arrays of different sizes. The sizes of those arrays is expressed through @@ -1110,7 +1110,13 @@ void bn_mul_normal(BN_ULONG *r, BN_ULONG *a, int na, BN_ULONG *b, int nb) } rr= &(r[na]); - rr[0]=bn_mul_words(r,a,na,b[0]); + if (nb <= 0) + { + (void)bn_mul_words(r,a,na,0); + return; + } + else + rr[0]=bn_mul_words(r,a,na,b[0]); for (;;) {